New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GM_log and GM_xhr truncates at NULL byte #1061
Comments
I'd love to see an example of what you're talking about with XHR like with log. |
here is a patch to fix the issue for GM_log.. |
I'm not sure this should be changed for GM_xhr, the string received from the userscript is passed along to a standard component, why should GM mess with the string and not the userscript? |
If you look at the C++ source this behavior is expected. I'm not sure if we want to protect the user from this or not, but I agree it is inconsistent with other ECMAScript API's. Maybe this should be filed upstream as well? I suspect it is a similar case for |
GM_xhr is just feeding the values thru to XMLHttpRequest w/ a chrome principle, which I imagine works the same as w/ a page principle . |
Strings with NULL bytes are truncated at the NULL byte. In the script below, the output of GM_log is truncated but alert() is not.
I'm also seeing this with GM_xmlhttpRequest when trying to POST binary data.
edit: This is with GM 0.8.20090920.2 and Firefox 3.5.5
The text was updated successfully, but these errors were encountered: