Closed Bug 347277 Opened 19 years ago Closed 19 years ago

Entering an non-integer sortkey crashes editclassifications.cgi

Categories

(Bugzilla :: Administration, task)

2.23
task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

When editing or adding a classification, entering an non-integer sortkey (due to a typo, for instance) crashes Bugzilla: DBD::mysql::db do failed: Column 'sortkey' cannot be null at /var/www/html/cvsbugzilla/editclassifications.cgi line 122 This is because nobody cares about the value returned by detaint_natural($sortkey). If the returned value is false, an error should be thrown instead. This is a regression due to bug 277377.
Attached patch patch, v1Splinter Review
Sortkeys must be validated too.
Assignee: administration → LpSolit
Status: NEW → ASSIGNED
Attachment #232115 - Flags: review?(bugzilla-mozilla)
Attachment #232115 - Flags: review?(bugzilla-mozilla) → review+
Flags: approval?
Flags: approval? → approval+
Checking in editclassifications.cgi; /cvsroot/mozilla/webtools/bugzilla/editclassifications.cgi,v <-- editclassifications.cgi new revision: 1.25; previous revision: 1.24 done Checking in template/en/default/global/user-error.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v <-- user-error.html.tmpl new revision: 1.180; previous revision: 1.179 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: