Closed
Bug 301067
Opened 19 years ago
Closed 19 years ago
[PostgreSQL] editusers.cgi doesn't do a case-insensitive comparison
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.22
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file)
|
665 bytes,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
editusers.cgi says "case-insensitive substring", but PostgreSQL clearly doesn't
do that, see lines 111-121:
$query .= " $nextCondition profiles.login_name ";
if ($matchtype eq 'regexp') {
$query .= $dbh->sql_regexp . ' ?';
$matchstr = '.' unless $matchstr;
} elsif ($matchtype eq 'notregexp') {
$query .= $dbh->sql_not_regexp . ' ?';
$matchstr = '.' unless $matchstr;
} else { # substr or unknown
$query .= 'like ?';
$matchstr = "%$matchstr%";
}
This part was missed by bug 285695.
If it's not a performance issue, we could remove the substring part completely
and do a regexp by default, which is really case-insensitive, even in Pg.| Assignee | ||
Updated•19 years ago
|
Target Milestone: --- → Bugzilla 2.20
Comment 1•19 years ago
|
||
Hrm. Honestly, I wouldn't particularly mind removing substring searches and replacing them entirely with regex searches, for this. However, we may have to add them back in some day if we want to support a DB without a REGEX operator. (As unlikely *cough*Sybase*cough* as that may be.) We could also use sql_istrcmp, which would easily solve the problem in this case.
Updated•19 years ago
|
No longer blocks: bz-postgres
| Assignee | ||
Comment 2•19 years ago
|
||
Comment 3•19 years ago
|
||
Comment on attachment 201687 [details] [diff] [review] patch, v1 Yeah, if you've tested this, this looks right.
Attachment #201687 -
Flags: review?(mkanat) → review+
| Assignee | ||
Updated•19 years ago
|
Flags: approval?
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
Updated•19 years ago
|
Flags: approval? → approval+
| Assignee | ||
Comment 4•19 years ago
|
||
Checking in editusers.cgi; /cvsroot/mozilla/webtools/bugzilla/editusers.cgi,v <-- editusers.cgi new revision: 1.108; previous revision: 1.107 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.
Description
•