You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.) What Tampermonkey version do you use? (go to 'chrome://extensions/' for
that information)
Tampermonkey version 3.6.3737.80
2.) What browser version (go to 'chrome://chrome/') and operating system do
you use?
Google Chrome version 34.0.1847.131 on Mac OS X
3.) Does a Userscript cause the problem? If so, from where can it be
downloaded?
Not specifically, no. The issue is present in any script that uses a FormData
object passed to GM_xmlhttpRequest()'s details object `data` property.
4.) Did this work before? Have you checked the script's bug
tracker/discussion page for that problem?
Yes, it used to work before.
5.) Are there other Userscripts installed and running?
Yes, but, again, this issue only affects scripts that use FormData in a
cross-domain GM_xmlhttpRequest().
6.) Steps to reproduce the problem:
a. Install any script that uses GM_xmlhttpRequest() with a FormData object
across domains.
b. Use it.
c. Observe error in console log: "No 'Access-Control-Allow-Origin' header is
present on the requested resource."
7.) What is the expected behavior? What went wrong?
The expected behavior is a successful cross-domain GM_xmlhttpRequest() call,
which the current Greasemonkey release completes without errors.
8.) Please provide any additional information below.
Third comment in related issue #77:
https://code.google.com/p/tampermonkey/issues/detail?id=77#c3
I notice that as of release version 3.6.3737, Tampermonkey no longer uses
cross-domain xmlhttpRequest if FormData is used. However, this is different
than how Greasemonkey behaves, and breaks compatibility with Greasemonkey
scripts.
Greasemonkey will still allow cross-domain xmlhttpRequest to be used if the
details object's `data` property is passed a FormData object.
I think this is an implementation bug, since it causes incompatibilities.
Original issue reported on code.google.com by meit...@gmail.com on 25 Apr 2014 at 11:06
The text was updated successfully, but these errors were encountered:
This is caused by issue 222652, the isolated worlds (which are good in general)
prevent TM from passing the FormData object to the background context with
cross-domain capabilities - only plain string or numerical data can be passed.
Since there is no way to get data out of a FormData object TM can not decode
and transfer it to its background context.
Original comment by derj...@googlemail.com on 29 Apr 2014 at 9:38
Oh, I understand now. Thanks for explaining what's going on here to me.
I will submit patches to the scripts that I use with an explanation of how they
can manually create a multipart/form-data request as a string instead of
relying on FormData objects.
For anyone who comes to this thread after-the-fact, see this patch for a simple
example:
https://github.com/meitar/pat-okcupid/commit/6dcf82e04e633520b77121da167a930be0f
1ca1c
Original comment by meit...@gmail.com on 30 Apr 2014 at 12:23
No problem. Actually it's more a "can't fix" than a "won't fix". :)
I set this to "Accepted" again, cause I play with the idea to emulate the
FormData object to allow TM to get its data out.
Original comment by derj...@googlemail.com on 30 Apr 2014 at 6:46
Original issue reported on code.google.com by
meit...@gmail.com
on 25 Apr 2014 at 11:06The text was updated successfully, but these errors were encountered: