Open
Bug 1358878
Opened 9 years ago
Updated 3 years ago
cannot set cookie with JS in the jsonview
Categories
(DevTools :: JSON Viewer, defect)
Tracking
(Not tracked)
UNCONFIRMED
People
(Reporter: perez.romain, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170418122848
Steps to reproduce:
- in about:config, set devtools.jsonview.enabled to true
- make a request to a JSON API; if content-type is application/json, jsonview will render the data
- use a bookmarklet like the one generated by https://www.jetbrains.com/phpstorm/marklets/ to set a cookie. The code is something like "javascript:(/**%20@version%200.5.2%20*/function()%20{document.cookie='XDEBUG_SESSION='+'PHPSTORM'+';path=/;';})()"
Actual results:
You can read the cookies on the server or in the browser console. The XDEBUG_SESSION cookie is not set.
Expected results:
It should set the cookie.
If I use the bookmarklet on a page that doesn't have jsonview active, the cookie is set.
Updated•9 years ago
|
Component: Untriaged → Developer Tools: JSON Viewer
Comment 1•9 years ago
|
||
This seems caused by
// Because content might still have a reference to this window,
// force setting it to a null principal to avoid it being same-
// origin with (other) content.
request.loadInfo.resetPrincipalToInheritToNullPrincipal();
Updated•8 years ago
|
Product: Firefox → DevTools
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•