Closed Bug 560451 Opened 14 years ago Closed 14 years ago

Fennec allows uninstall attempt of add-ons in root-owned directories

Categories

(Firefox for Android Graveyard :: Extension Compatibility, defect)

Other
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jaakko.kiviluoto, Assigned: wolfiR)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.3 Safari/533.4
Build Identifier: Fennec 1.1a2pre

Fennec does not check if the install location of an add-on is accessible. The uninstall button in Extension Manager should be disabled if the user does not have write access rights to the add-on's files.

Reproducible: Always

Steps to Reproduce:
1. As root, install an add-on from a .deb package so that it lands under /usr/lib/fennec/extensions, which is not writable by current user
2. Go to extension manager, select the installed add-on and tap "Uninstall" button
Actual Results:  
2. Add-on seems to be uninstalled, but actually is not

Expected Results:  
2. The "Uninstall" button should be disabled
Attached patch Proposed fix (obsolete) — Splinter Review
Adds "isReadOnly" attribute to extension list items, which will be used to disable the uninstall button if the add-on can not be uninstalled by current user.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #440148 - Flags: review?(21)
Comment on attachment 440148 [details] [diff] [review]
Proposed fix

Code looks good.

Thanks for the patch :)
Attachment #440148 - Flags: review?(21) → review+
Comment on attachment 440148 [details] [diff] [review]
Proposed fix

The addon manager has been changed on mozilla-central and it breaks this patch. See bug 562495.
Attachment #440148 - Flags: review+ → review-
Attached patch updated patch (obsolete) — Splinter Review
This patch works for me when based on the dependent patch.
Attachment #440148 - Attachment is obsolete: true
Attachment #445944 - Flags: review?(mark.finkle)
Comment on attachment 445944 [details] [diff] [review]
updated patch

Looks good. Must wait for dependent patch to land first.
Attachment #445944 - Flags: review?(mark.finkle) → review+
Attached patch complete patchSplinter Review
/me needs to remember to recheck before attaching a patch that it's the latest one.
Sorry, there was missing one (slightly important) bit.
Attachment #445944 - Attachment is obsolete: true
Attachment #446145 - Flags: review?(mark.finkle)
Attachment #445944 - Flags: review+ → review-
Comment on attachment 446145 [details] [diff] [review]
complete patch

Yes, we'll need the anonid :)
Attachment #446145 - Flags: review?(mark.finkle) → review+
http://hg.mozilla.org/mobile-browser/rev/7a40d5b5552a
Assignee: nobody → mozilla
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: