Closed Bug 247606 Opened 16 years ago Closed 16 years ago
Review Firefox JS for dangerous eval() use
Uses of these functions should be removed if they are not necessary: * eval(name, formalParams, code) parseInt new RegExp call an event handler directly (might require a fix for bug 246720) * new Function(code) * setTimeout(code, time). setTimeout(function, time, param1, ...) I think these only become security holes when untrusted strings are passed in, like in bug 87980 and bug 191817. But removing as many uses as possible improves performance slightly and makes future security audits easier.
Summary: Review Firefox JS for dangerous eval() and setTimeout() use → Review Firefox JS for dangerous eval() use
cc firstname.lastname@example.org, since my patch changes his code in about:config.
Comment on attachment 151649 [details] [diff] [review] patch for trunk My only concern is whether you used closures everywhere you needed to for the timeout callbacks to have the correct global object. Assuming you've tested all this, r=me.
Attachment #151649 - Flags: review?(bryner) → review+
I'll test the ones that reference global variables. Bryner, are you worried that the global object itself will change due to scoping rules? (I don't see why it would change.) Or are you worried that the values of global variables will change before the timer fires?
Checked in, trunk and aviary, with a comment change in browser.js based on what Neil said. The only conflict in moving to the branch was that credits.html moved.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox1.0beta
You need to log in before you can comment on or make changes to this bug.