Modify ↓
Opened 15 years ago
Closed 13 years ago
#7145 closed defect (invalid)
PrivateTicketsPlugin is case sensitive for username
Reported by: | Steven R. Loomis | Owned by: | Noah Kantrowitz |
---|---|---|---|
Priority: | normal | Component: | PrivateTicketsPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
We use e-mail addresses as usernames. It seems that the plugin is case sensitive, so if the owner name is 'Mark@…' but they authenticate as 'mark@…', this plugin won't let them see the ticket.
I think the plugin should be case insensitive.
Attachments (1)
Change History (4)
Changed 15 years ago by
Attachment: | 7145case.patch added |
---|
comment:1 Changed 15 years ago by
not sure the patch attached properly.
Index: 0.11/privatetickets/policy.py =================================================================== --- 0.11/privatetickets/policy.py (revision 7874) +++ 0.11/privatetickets/policy.py (working copy) @@ -63,17 +63,17 @@ if perm.has_permission('TICKET_VIEW_REPORTER'): had_any = True - if tkt['reporter'] == perm.username: + if tkt['reporter'].lower() == perm.username.lower(): return None if perm.has_permission('TICKET_VIEW_CC'): had_any = True - if perm.username in [x.strip() for x in tkt['cc'].split(',')]: + if perm.username.lower() in [x.strip().lower() for x in tkt['cc'].split(',')]: return None if perm.has_permission('TICKET_VIEW_OWNER'): had_any = True - if perm.username == tkt['owner']: + if perm.username.lower() == tkt['owner'].lower(): return None if perm.has_permission('TICKET_VIEW_REPORTER_GROUP'): @@ -126,4 +126,5 @@ groups.add(action) repeat = True - return groups \ No newline at end of file + return groups +
comment:2 Changed 14 years ago by
Summary: | PrivateTicketsPlugin is case sensitive → PrivateTicketsPlugin is case sensitive for username |
---|
Case-sensitivity should be an option for the plugin.
comment:3 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
There is a Trac option ignore_auth_case
(in the [trac]
section of trac.ini
). By default it is false. It appears that your authentication mechanism is case insensitive, but Trac is set to be case sensitive.
Note: See
TracTickets for help on using
tickets.
7145case.patch - works for me