Opened 7 years ago

Closed 5 years ago

#7145 closed defect (invalid)

PrivateTicketsPlugin is case sensitive for username

Reported by: Srl295 Owned by: coderanger
Priority: normal Component: PrivateTicketsPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11


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)

7145case.patch (1.2 KB) - added by Srl295 7 years ago.
7145case.patch - works for me

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by Srl295

7145case.patch - works for me

comment:1 Changed 7 years ago by Srl295

not sure the patch attached properly.

Index: 0.11/privatetickets/
--- 0.11/privatetickets/	(revision 7874)
+++ 0.11/privatetickets/	(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 @@
                     repeat = True 
-        return groups
\ No newline at end of file
+        return groups

comment:2 Changed 6 years ago by rjollos

  • Summary changed from PrivateTicketsPlugin is case sensitive to PrivateTicketsPlugin is case sensitive for username

Case-sensitivity should be an option for the plugin.

comment:3 Changed 5 years ago by rjollos

  • Resolution set to invalid
  • Status changed from new to 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.

Add Comment

Modify Ticket

as closed The owner will remain coderanger.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.