Closed Bug 177436 Opened 23 years ago Closed 23 years ago

User matching shouldn't be case-sensitive

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.17
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: justdave, Assigned: myk)

References

Details

Attachments

(1 file, 2 obsolete files)

On bugzilla-tip on landfill (with usermatchtype in params set to "search" rather than "wildcard"), I entered "miller" in the CC field on a bug and hit Commit. I was prompted with several choices, none of which were me. The ones I got all had "miller" as part of their email address as well. I went back and changed it to "Miller" and this time it found me.
Blocks: 176570
INSTR in mysql < 4.0 is case-sensitive, while LIKE is not. Per a brief discussion on #mozwebtools, this patch moves substring searches to LIKE rather than INSTR.
Comment on attachment 104787 [details] [diff] [review] Changes INSTR in queries to LIKE for case insensitivity Works, r=myk. It's trivial, but I want bbaetz to look it over too, since he was the one who suggested INSTR as I recall, so wait for his second r= before checking this in.
Attachment #104787 - Flags: review+
Also you should fix the comment on line 138 to say something like "# then try sub-string search".
Removed INSTR from comments.
Attachment #104787 - Attachment is obsolete: true
You need to escape literal \, %, and _ if you use LIKE. sqlquote does \, but not the others. I don't reacall mentioning using substring, but istm that it would be faster than LIKE. The correct way to do case insensitive substring stuff is to do SUBSTRING(TOUPPER(foo), $bar).
(where $bar is capitalised in advance in perl)
That's absolutely a better way of doing it. I presume you meant INSTR rather than SUBSTRING.
Attachment #104795 - Attachment is obsolete: true
Comment on attachment 105093 [details] [diff] [review] Case-insensitive INSTR 2xr= justdave Tested on landfill, it works. a= justdave for checkin during 2.17.1 freeze
Attachment #105093 - Flags: review+
Checked in for not_erik Checking in Bugzilla/User.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm new revision: 1.6; previous revision: 1.5 done
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.18
I did, yes pg doesn't have INSTR, so you should use: |position($bar in toupper(foo)) > 0| which is standard sql. Except that oracle doesn't appear to have 'position', so leave it as is, and we'll deal with it later.
Target Milestone: Bugzilla 2.18 → ---
oops...
Target Milestone: --- → Bugzilla 2.18
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: