Closed
Bug 678959
Opened 14 years ago
Closed 14 years ago
GenerateUniqueToken() fails if the table doesn't contain a userid column
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: glob, Assigned: glob)
Details
Attachments
(1 file)
|
409 bytes,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
GenerateUniqueToken() fails if the table doesn't contain a userid column, because it uses the following to test if a token exists:
SELECT userid FROM $table WHERE $column = ?
This makes it hard to use from an extension.
Attachment #553138 -
Flags: review?
Comment 1•14 years ago
|
||
Comment on attachment 553138 [details] [diff] [review]
patch v1
OK, there is no reason to select userid specifically besides to make sure that the token doesn't already exist in this table. So SELECT 1 does exactly the same job. r=LpSolit
Attachment #553138 -
Flags: review? → review+
Comment 2•14 years ago
|
||
Let's take it for 4.2 as it may cause troubles for some extensions. For 4.0.x, developers will have to write their own GenerateUniqueToken(), which is not a big deal.
Severity: normal → minor
Status: NEW → ASSIGNED
Flags: approval4.2+
Flags: approval+
Target Milestone: --- → Bugzilla 4.2
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/4.2/
modified Bugzilla/Token.pm
Committed revision 7898.
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Token.pm
Committed revision 7916.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•