Closed
Bug 370510
Opened 18 years ago
Closed 17 years ago
Extension upload rejects valid extension versions
Categories
(addons.mozilla.org Graveyard :: Developer Pages, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jwkbugzilla, Unassigned)
References
()
Details
Just got the following message when testing extension upload: "The version of this add-on is invalid: please see the specification". It seems the regular expression used here is /^\d+(\.\d+){0,3}$/ (/app/controllers/components/developers.php). Even the outdated specification cited (Firefox 1.0 version number format) allows to use "+" at the end of the version number, Firefox 1.5 version numbers are far more flexible. The version numbers I use for development builds have the form 0.7.2.4+.2007020523 - perfectly valid.
Comment 1•18 years ago
|
||
The regex is from bug 299479. What pattern would you suggest instead?
Reporter | ||
Comment 2•18 years ago
|
||
/^\d+(\+|\w+)?(\.\d+(\+|\w+)?)*$/
Reporter | ||
Comment 3•18 years ago
|
||
And current specification is http://developer.mozilla.org/en/docs/Toolkit_version_format
Comment 4•18 years ago
|
||
(In reply to comment #2)
> /^\d+(\+|\w+)?(\.\d+(\+|\w+)?)*$/
>
shaver: r+?
Comment 5•18 years ago
|
||
That regex doesn't look like it'd permit
1.5pre4
which is also a valid format according to the doc Wladimir linked. r=shaver on any regex that passes all the right tests, though! :)
Comment 6•18 years ago
|
||
RyanJones pointed out that I'm wrong, and it does permit that, so yeah, I guess that's fine!
Updated•18 years ago
|
Assignee: nobody → fligtar
Comment 7•18 years ago
|
||
Changed regex and updated specification link in r2191
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 8•18 years ago
|
||
Confirmed, works now.
Comment 9•18 years ago
|
||
AMO isn't accepting 1.0.0b4.r5 as a version format due to the version part beginning with a letter instead of a number (".r5"). As far as I can tell from the spec, this should be allowed, since all four parts of the version part are optional (and it installs fine in Firefox).
/^\d+(\+|\w+)?(\.((\d+(\+|\w+)?)|\w+))*$/ would work.
![]() |
||
Comment 10•18 years ago
|
||
Reopening because problem is back, see comment #9
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 11•18 years ago
|
||
Absolutely any string can be parsed as a version, so I suggest you remove the regex altogether
Updated•18 years ago
|
Assignee: fligtar → nobody
Status: REOPENED → NEW
Comment 12•17 years ago
|
||
I think this is somewhere we want to disagree with Firefox. Although any string might be able to be used as a version in Firefox, I'd rather AMO stick with a consistent pattern that is ubiquitous. Having said that, marking FIXED again - I think we should keep the existing regex.
Status: NEW → RESOLVED
Closed: 18 years ago → 17 years ago
Resolution: --- → FIXED
Comment 13•17 years ago
|
||
Why not warn instead of erroring out? What is the problem you're trying to protect against?
Assignee | ||
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•