Closed
Bug 1198659
Opened 9 years ago
Closed 9 years ago
Custom fields of type INTEGER should accept negative integers
Categories
(Bugzilla :: Administration, task)
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file, 1 obsolete file)
1.47 KB,
patch
|
gerv
:
review+
|
Details | Diff | Splinter Review |
The backend code for custom fields of type INTEGER accepts negative integers via detaint_signed(), but the frontend code doesn't as it uses \d+ to validate the data entered by the user. This is inconsistent. As the backend code accepts negative integers, there is no reason for such a limitation in the frontend.
Assignee | ||
Comment 1•9 years ago
|
||
The pattern must match -?\d+ instead of \d+ to accept negative numbers. I also added a title as at least Firefox uses it to display which data format is expected if the value doesn't match the pattern.
Attachment #8652784 -
Flags: review?(gerv)
Assignee | ||
Comment 2•9 years ago
|
||
The backend code accepts negative numbers, but should compare the absolute value, else very large negative numbers would crash PostgreSQL.
Attachment #8652784 -
Attachment is obsolete: true
Attachment #8652784 -
Flags: review?(gerv)
Attachment #8652785 -
Flags: review?(gerv)
Comment 3•9 years ago
|
||
Comment on attachment 8652785 [details] [diff] [review] patch, v1.1 Review of attachment 8652785 [details] [diff] [review]: ----------------------------------------------------------------- r=gerv. Gerv
Attachment #8652785 -
Flags: review?(gerv) → review+
Updated•9 years ago
|
Flags: approval?
Flags: approval5.0?
Updated•9 years ago
|
Flags: approval?
Flags: approval5.0?
Flags: approval5.0+
Flags: approval+
Assignee | ||
Comment 4•9 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 4b3f99a..4864903 master -> master To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 7d3c1b0..ea25c5c 5.0 -> 5.0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•