Closed Bug 599121 Opened 14 years ago Closed 13 years ago

Addon version check is too strict

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: rimas, Unassigned)

References

()

Details

According to https://developer.mozilla.org/en/Toolkit_version_format, each part of the addon version string consists of four non-mandatory parts:

<number-a><string-b><number-c><string-d>

However, the current version checking regexp is like this:
/^\d+(\+|\w+)?(\.\d+(\+|\w+)?)*$/
which is incorrect, because:
1) it assumes the <number-a> part is always present,
2) it treats parts <number-c> and <string-d> as invalid, and
3) (\+|\w+) is actually too limiting for string parts which are specified as ASCII strings.

This should be fixed, because right now, it's basically impossible to upload an add-on with a version component like .vcs20100923 .

As few a side notes:
1) that vague specification of string parts leaves me wondering whether or not they can contain digits
2) if they cant' then it's a little weird that versions like 1.2.1+vcs20100923 are specified to be treated as lower than 1.2.1 while 1.2.1+20100923 is higher, but if they can, this would be a little ambigous.
Severity: normal → trivial
Priority: -- → P5
Target Milestone: --- → Future
According to bug 641087 we allow /[A-Za-z0-9+*.-]+/
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.