Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8411

UI5 FileUploader, CSRF Tokens, and IE9

$
0
0

Hi Guys,

 

I'm working on a UI5 application, and seem to have run into an issue uploading files in IE9.  Here is the breakdown of what I have tried so far:

 

1.  Used the UI5 out of the box FileUploader control from SAP.  This control uses a <form> post to send the file to an endpoint.  In my case this is a restful service sitting on an R3 server.  This service requires a CSRF token to complete a modifying request.  I am able to get this token, but I am unable to force this token into the request headers of the form post.

 

2.  Implemented a jQuery ajax request with the token added, following the suggestions of this thread.  I thought I was home free until I tried it in IE9 and found that the browser does not use the File API, and is unable to access any details of the file.  This effectively eliminates this solution as you have no payload to send through the service.

 

3.  I have attempted to write a .NET page in between the website and the upload service.  The file is posted to the middle page, the data from the file and the token is pulled out of the request by the middle page, and then an HTTPWebRequest is sent to the service.  Unfortunately, this .NET Page is not sitting on the R3 server (obviously) so the SSO cookie that I am using between the original site and the services is not available to use.

 

So, can anyone help?

 

-  Has anyone found a way to use the FileUploader control with IE9 (found a way to get the CSRF token into the request for the R3 server)?

-  Has anyone come up with a different approach to uploading files to an R3 server with IE9?

-  Has anyone had success with this "anti-XSRF cookie" discussed in this article?

 

Any help would be great.  Thanks.


Viewing all articles
Browse latest Browse all 8411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>