Closed
Bug 604830
Opened 15 years ago
Closed 14 years ago
Plugin ID invalid message doesn't match the test
Categories
(Other Applications Graveyard :: ChatZilla, defect)
Other Applications Graveyard
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sandreas41, Assigned: bugzilla-mozilla-20000923)
Details
(Whiteboard: [cz-0.9.87])
Attachments
(1 file, 3 obsolete files)
1.48 KB,
patch
|
samuel
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20090102 SeaMonkey/1.1.14
Build Identifier: ChatZilla 0.9.86 [SeaMonkey 1.1.14/0000000000]
According to the error message, an ID can contain alphanumeric characters, dash (_) and hyphen (-).
According to the code, an ID can contain alphabetic characters (no numbers), dash (_) and hyphen (-).
Oops?
Reproducible: Always
Steps to Reproduce:
1. In a plugin, set:
plugin.id = "seamonkey-1_1_14-menu-fix";
(for example)
2. Attempt to load plugin
Actual Results:
Plugin <...> does not have a valid id. Plugin ids may only contain alphanumeric characters, underscores (_) and dashes (-).
Expected Results:
Plugin “seamonkey-1_1_14-menu-fix” is now enabled.
Attachment #483682 -
Flags: review?
Missed a spot. :(
Attachment #483682 -
Attachment is obsolete: true
Attachment #483683 -
Flags: review?(gijskruitbosch+bugs)
Attachment #483682 -
Flags: review?
Comment 3•15 years ago
|
||
It would be preferable to refactor that bit of code so that the conditions aren't all repeated.
Also, \w includes \d. Assuming your intention was to force the ID to start with a letter, the regex you want is /^[A-Za-z][\w-]*$/
Assignee: rginda → sandreas41
Severity: normal → minor
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 4•14 years ago
|
||
Assignee: sandreas41 → silver
Attachment #483683 -
Attachment is obsolete: true
Attachment #521215 -
Flags: review?(samuel)
Attachment #483683 -
Flags: review?(gijskruitbosch+bugs)
Comment 5•14 years ago
|
||
Comment on attachment 521215 [details] [diff] [review]
Add numbers to allowed regexp
It's a little odd that we're checking all the conditions twice... (Yes, I do kind of see the reason for it there.)
Attachment #521215 -
Flags: review?(samuel) → review+
Comment 6•14 years ago
|
||
Why not just match it once and save the result in a local variable?
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #521215 -
Attachment is obsolete: true
Attachment #522343 -
Flags: review?(samuel)
Updated•14 years ago
|
Attachment #522343 -
Flags: review?(samuel) → review+
Assignee | ||
Comment 8•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•14 years ago
|
Whiteboard: [cz-0.9.87]
Updated•3 months ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•