This project has moved and is read-only. For the latest updates, please go here.

How can I add a header x-requestdigest (canary to every post request)

Nov 13, 2012 at 6:19 PM

Is there a way to add a canary X-RequestDigest to any post operation on Sharepoint webservices post via SPServices ?

Nov 21, 2012 at 4:33 AM

To be honest, I have no idea.


Dec 6, 2012 at 4:49 PM

Sharepoint Web Services are susceptible to Cross Site Request Forgery attacks if they do not validate a form digest or can not validate the X-RequestDigest value. Based on the security validation document for Sharepoint
one should be able to attach the X-RequestDigest header to a web service call.  I have however tried adding random values to the X-RequestDigest header and sent requests to sharepoint web services and there has been no validation.

Can anyone validate that they have seen the same behaviour or if there is anything that can be done to prevent CSRF on Sharepoint web services.

Dec 7, 2012 at 2:12 PM

I found a post about it. I'm not sure if you've seen this, but here it is:

It seems like you are writing server side code, not necessarily JavaScript. Is that what you are doing?