You are viewing limited content. For full access, please sign in.

Question

Question

When user's are trying to submit a specific form the receive the ERROR: An unexpected error has occurred. [LFF502-UnexpectedError]

asked on July 22, 2016 Show version history

Hello,

I am currently experiencing an issue where users attempt to submit a specific form and the receive the error in the attached screenshot. I have checked the Forms Server event viewer and was able to locate the errors in question:

 

Error 1:

An unexpected error has occurred. [LFF502-UnexpectedError]

Details:
URL: /Forms/Form/Submit
Error: UnexpectedError
Date: 07/21/2016 3:28:05 PM (Central Standard Time)
HTTP Status Code: 500
User: AISD\laserfiche
IP: 10.199.33.69
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
Business Process ID: 153
Business Process Name: HR-Hire Prof PAF

Stack Trace:
Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException
Message: An unexpected error has occurred. [LFF502-UnexpectedError]


Inner exception: System.Web.HttpRequestValidationException
Message: A potentially dangerous Request.Form value was detected from the client (Field409="... TalentEd.<br>ALT ED CERT 1 YE...").
   at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)
   at System.Web.HttpValueCollection.Get(String name)
   at E_Forms.Models.ViewModels.Form.Submit.GetFieldDataFromForm(HttpRequestBase request)
   at E_Forms.Models.ViewModels.Form.Submit.RetrieveDataFromForm(HttpRequestBase request, Dictionary`2 formdata, Boolean SaveAll)
   at E_Forms.Controllers.FormController.Submit()
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
 

Error 2:

An unexpected error has occurred. [LFF502-UnexpectedError]

Details:
URL: /Forms/webapi/v1/user/settings/get
Error: UnexpectedError
Date: 07/21/2016 3:35:51 PM (Central Standard Time)
HTTP Status Code: 500
User: AISD\laserfiche
IP: 10.199.33.69
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0

Stack Trace:
Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException
Message: An unexpected error has occurred. [LFF502-UnexpectedError]


Inner exception: System.OperationCanceledException
Message: The operation was canceled.
   at System.Threading.CancellationToken.ThrowIfCancellationRequested()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()

I have not been able to find exactly what is causing the issue though from this error, any assistance on this would be greatly appreciated.

Thanks!

0 0

Replies

replied on July 22, 2016

Hi Charles,

Are you by any chance using a VAR kit? If you are, try restarting the Laserfiche forms routing service in 'view local services' on your computer. Is this error occurring when you try to submit different forms?

0 0
replied on July 22, 2016

Hi Charles,

From the first trace it seems that you are running into an issue with raw HTML data being used in a field value. It looks like the problem data is in field 409, and the data begins with "TalentEd.<br>ALT ED CERT 1 YE". The "<br>" in there, specifically the angle brackets, are causing the error. To find field 409 you can use either a DOM inspector or from the Form editor, go to the custom CSS/JavaScript editor and search on the page (Ctrl + F) for "q409".

If this is happening for every submission of the form, and it does not seem that someone is entering this value in the field, you may want to check whether there is any custom JavaScript related to that field which because of a missing close-paren (or something like that) may be trying to interpret the actual page HTML as the field value.

Note that HTML tags used in the custom HTML fields should be processed and it is acceptable to include them there; this error is not specific to Forms and can happen when HTML values are included in submitted form data in general, as this can be used maliciously to inject code to the script which handles the submission.

0 0
replied on July 22, 2016

Hello,

 

I will still need to check if there is custom Java Script related to the field. If there was though, what could potentially be done to resolve this issue? I was able to find the field in question. I have provided a screen shot of it. 

 

Thanks!

q409.jpg
q409.jpg (12.65 KB)
0 0
replied on July 22, 2016

Without more details it's hard to say. If there are any functions which write to the page or which try to populate the value of this field based on some other one, those would be candidates I'd start with.

Another angle to troubleshoot would be to check the Message data from the inner exception for each event logged for a failed submission. Is it the same for every submission, or does it differ? If it is the same, that would strongly suggest that something embedded in the page is causing this. If not, then it is likely dependent on user input. (Maybe whoever is filling out this field is copying and pasting from another source which isn't parsing out the HTML correctly?)

In either situation, you can look for the text "Talent Ed." and "ALT ED CERT 1 YE" mentioned in the trace you had pasted. If they exist somewhere on the form, that is a place to look further. If they do not appear on the form, then they were entered by the submitter.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.