File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
dotnet/src/dotnetframework/GxClasses/Services Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ public void WebException(Exception ex)
392392 {
393393 throw ex ;
394394 }
395- else if ( ex is FormatException || ex is HttpAntiForgeryException )
395+ else if ( ex is FormatException || ( RestAPIHelpers . ValidateCsrfToken ( ) && AntiForgeryException ( ex ) ) )
396396 {
397397 HttpHelper . SetUnexpectedError ( httpContext , HttpStatusCode . BadRequest , ex ) ;
398398 }
@@ -401,6 +401,12 @@ public void WebException(Exception ex)
401401 HttpHelper . SetUnexpectedError ( httpContext , HttpStatusCode . InternalServerError , ex ) ;
402402 }
403403 }
404+ [ SecuritySafeCritical ]
405+ private bool AntiForgeryException ( Exception ex )
406+ {
407+ return ex is HttpAntiForgeryException ;
408+ }
409+
404410 public bool IsAuthenticated ( string synchronizer )
405411 {
406412 GXLogging . Debug ( log , "IsMainAuthenticated synchronizer:" + synchronizer ) ;
You can’t perform that action at this time.
0 commit comments