Closed
Bug 938223
Opened 11 years ago
Closed 10 years ago
Add validation for common GM pattern: sandbox.__proto__=sandbox.window
Categories
(addons.mozilla.org Graveyard :: Add-on Validation, defect)
addons.mozilla.org Graveyard
Add-on Validation
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jorgev, Unassigned)
References
Details
This line is generated by the old GreaseMonkey compiler:
sandbox.__proto__=sandbox.window;
It no longer works in Firefox, and many add-ons are still created with this compiler and submitted to AMO. It'd be good that we warn against this, since it will generally break the add-ons in question.
The message can be something like: "Invalid sandbox usage. We recommend that you use the Scriptify add-on as an alternative to generate a userscript extension."
Comment 1•11 years ago
|
||
Rather than creating a predefined entity for `sandbox.__proto__`, would you say it's safe to match (via regexp) the exact snippet in comment #0? That would be the least invasive means of accomplishing this, I think.
Comment 2•11 years ago
|
||
I think a regexp would be best. Something like r'\b__proto__\s*=.*\bwindow\b'
Comment 3•10 years ago
|
||
It's probably too late for this to be useful.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•