Closed Bug 678663 Opened 13 years ago Closed 6 years ago

Personas cannot be previewed from moz-filedata uris

Categories

(Toolkit :: Add-ons Manager, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: cvan, Unassigned)

References

Details

Attachments

(1 obsolete file)

A Persona cannot be previewed when `moz-filedata` is passed as a preview image URL (i.e., `headerURL`, `footerURL`).
I don't really understand how Personas work. Can you put a testcase up somewhere that I can play with?
http://people.mozilla.org/~cwiemeersch/personas.html I've created a test case wherein you can see (1) a Persona being referenced by an HTTP URL and (2) upload an image to reference the Persona by a moz-filedata URI. Please let me know if you have any questions. Thanks!
Thanks for the testcase. Personas has a protocol whitelist at http://hg.mozilla.org/mozilla-central/annotate/922f27baed98/toolkit/mozapps/extensions/LightweightThemeManager.jsm#l647 that does not include moz-filedata.
Component: DOM → Add-ons Manager
Product: Core → Toolkit
QA Contact: general → add-ons.manager
How close is that to bug 577606?
Very close. Why exactly are we, once again, using some sort of hardcoded protocol list? :(
Blocks: 577606
Hey, just checking in. Any update on this?
Dão, is there more to this than just adding these schemes to the whitelist? In terms of security we already require the site to be on the add-on whitelist in order to preview and we show a notification bar in order to install. If this approach is fine I'll write tests for it. AMO would like to use this to allow authors to preview personas before they are uploaded to the site.
Attachment #571897 - Flags: feedback?(dao)
Comment on attachment 571897 [details] [diff] [review] WIP allow data, blob & moz-filedata URIs for lightweight themes I don't know what the blob protocol is, but in general this is the right place. You should probably update _persistImage, as persisting won't be needed e.g. for "data"?
Attachment #571897 - Flags: feedback?(dao)
The line Dao is talking about is here: http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/LightweightThemeManager.jsm#774 That protocols list should be moved out of sanitizeTheme so it can be used in both places.
Comment on attachment 571897 [details] [diff] [review] WIP allow data, blob & moz-filedata URIs for lightweight themes (In reply to Dão Gottwald [:dao] from comment #8) > Comment on attachment 571897 [details] [diff] [review] > WIP allow data, blob & moz-filedata URIs for lightweight themes > > I don't know what the blob protocol is, but in general this is the right > place. The blob protocol is the standardized version of moz-filedata. I've attached a patch on bug 678663 for data URIs which could be used as a workaround for lack of moz-filedata once that bug is resolved. I think that adding data URI support will reduce most of the need for moz-filedata support since the result as a persona would be the same. It may make sense for previewing but it doesn't for installing since it's revoked when the documented that created it is unloaded [1]. That would mean either: a) supporting moz-filedata for preview only - this may be confusing to users and developers b) Converting personas with moz-filedata URLs to data ones so that they will persist. This can be done just as easily by a web developer once bug 678663 is fixed. [1] http://dev.w3.org/2006/webapi/FileAPI/#lifeTime
Attachment #571897 - Attachment is obsolete: true
(In reply to Matthew N. [:MattN] from comment #10) > b) Converting personas with moz-filedata URLs to data ones so that they will > persist. This can be done just as easily by a web developer once bug 678663 > is fixed. Do you mean bug 577606?
Blocks: 771850
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: