Last Comment Bug 307925 - Installing extensions with guids with a trailing / cause an unknown error.
: Installing extensions with guids with a trailing / cause an unknown error.
: fixed1.8
Product: Toolkit
Classification: Components
Component: Add-ons Manager (show other bugs)
: 1.8.0 Branch
: All All
-- trivial (vote)
: ---
Assigned To: Dave Townsend [:mossop]
: Andy McKay [:andym]
Depends on:
  Show dependency treegraph
Reported: 2005-09-10 13:02 PDT by Dave Townsend [:mossop]
Modified: 2008-07-31 04:30 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (1.20 KB, patch)
2005-09-10 13:04 PDT, Dave Townsend [:mossop]
robert.strong.bugs: review+
asa: approval1.8b5+
Details | Diff | Splinter Review

Description User image Dave Townsend [:mossop] 2005-09-10 13:02:04 PDT
The test for valid guids in the extension manager allows a trailing /.
Installation then fails when trying to create a directory with that name with
the following error in the JavaScript console:

Error: [Exception... "Component returned failure code: 0x80520001
(NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.append]"  nsresult: "0x80520001
(NS_ERROR_FILE_UNRECOGNIZED_PATH)"  location: "JS frame ::
:: anonymous :: line 1085"  data: no]
Source File:
Line: 1085
Comment 1 User image Dave Townsend [:mossop] 2005-09-10 13:04:44 PDT
Created attachment 195570 [details] [diff] [review]

This patch simply removes the optional trailing slash from the regular
expression that is used to test for valid guids.

This is a pretty minor issue and should only really stop some confusion for
extension authors who might make the mistake.
Comment 2 User image Robert Strong [:rstrong] (use needinfo to contact me) 2005-09-12 06:17:42 PDT
Benjamin - was there a reason the ext id regexp allowed an optional '/' on the
end of the id?
Comment 3 User image Benjamin Smedberg [:bsmedberg] 2005-09-12 06:25:36 PDT
Ben wrote the original regexp: IIRC, it was checking directory names and he was
having problems with a trailing slash. I'm hoping that we changed to use
leafnames since then.
Comment 4 User image Robert Strong [:rstrong] (use needinfo to contact me) 2005-09-12 06:37:14 PDT
Thanks and that makes sense. I had already verified it does use the leafName
everywhere the regexp is used so this should be good to go.
Comment 5 User image Christian :Biesinger (don't email me, ping me on IRC) 2005-09-14 10:35:58 PDT
Checking in toolkit/mozapps/extensions/src/;
/cvsroot/mozilla/toolkit/mozapps/extensions/src/,v  <--
new revision: 1.153; previous revision: 1.152
Comment 6 User image Dave Townsend [:mossop] 2005-09-14 14:09:09 PDT
Fixed on trunk.
Comment 7 User image Robert Strong [:rstrong] (use needinfo to contact me) 2005-09-14 22:39:20 PDT
Comment on attachment 195570 [details] [diff] [review]

asking for 1.8b5 so there is consistency for what are considered valid id's
between trunk and branch.
Comment 8 User image Robert Strong [:rstrong] (use needinfo to contact me) 2005-09-15 21:27:07 PDT
Checked in on MOZILLA_1_8_BRANCH

Checking in mozilla/toolkit/mozapps/extensions/src/;
/cvsroot/mozilla/toolkit/mozapps/extensions/src/,v  <--
new revision:; previous revision:

Thanks for the patch!

Note You need to log in before you can comment on or make changes to this bug.