Closed Bug 808697 Opened 12 years ago Closed 12 years ago

Error: Permission denied to access property 'utils'

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: KWierso, Assigned: KWierso)

Details

Attachments

(1 file)

error: addon-sdk: TEST FAILED: test-sandbox.test non-privileged (exception)
error: addon-sdk: An exception occurred.
Traceback (most recent call last):
  File "", line 1, in 
Error: Permission denied to access property 'utils'



This cropped up sometime over the weekend. Wasn't a change on our side.

https://tbpl.mozilla.org/php/getParsedLog.php?id=16756620&tree=Mozilla-Inbound&full=1
This log includes other test failures that have already been fixed, I just haven't updated mozilla-inbound/central to realize that.
Yes, I changed the Components object to throw (instead of silently failing) when unprivileged callers touch things they're not supposed to. The test needs to be fixed.
I have no idea if what this patch does is the correct way to fix the test, but the test passes with this change on release, beta, aurora, and a recent nightly.
Assignee: nobody → kwierso
Status: NEW → ASSIGNED
Attachment #678648 - Flags: review?(rFobic)
Removing test coverage isn't great. A try/catch approach would be better.
(In reply to Bobby Holley (:bholley) from comment #5)
> Removing test coverage isn't great. A try/catch approach would be better.

Changing that line makes the if() false, so it goes into the else block, which tests that it does throw. If I understand the test correctly, 14 and earlier throw when accessing Components, 15 through 18 silently fail (the * in Components.* are just undefined), and now 19 and newer throw again.
(In reply to Wes Kocher (:KWierso) from comment #6)
> (In reply to Bobby Holley (:bholley) from comment #5)
> > Removing test coverage isn't great. A try/catch approach would be better.
> 
> Changing that line makes the if() false, so it goes into the else block,
> which tests that it does throw. If I understand the test correctly, 14 and
> earlier throw when accessing Components, 15 through 18 silently fail (the *
> in Components.* are just undefined), and now 19 and newer throw again.

Correct.
Attachment #678648 - Flags: review?(rFobic) → review+
Commit pushed to stabilization at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/560bfbdb810aa0e48a92c22423382849fc062db8
Fix bug 808697 - Firefox 19 now throws when unprivileged code tries to use Components' properties. r=gozala
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/e6f2cb14c7a051ada2ba272e6a3359fce9a3a7c5
Fix bug 808697 - Firefox 19 now throws when unprivileged code tries to use Components' properties. r=gozala
(cherry picked from commit 560bfbdb810aa0e48a92c22423382849fc062db8)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: