#11594 closed defect (fixed)
Email obfuscation for owner field in csv download
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 0.12.6 |
Component: | ticket system | Version: | 0.12-stable |
Severity: | normal | Keywords: | obfuscation |
Cc: | Branch: | ||
Release Notes: |
Obfuscate emails in owner field on csv download from ticket and query pages. |
||
API Changes: | |||
Internal Changes: |
Description
If owner field has email address, csv download of ticket and query page renders the email address without obfuscation.
Csv download of report page doesn't have the issue.
Attachments (0)
Change History (6)
comment:1 by , 11 years ago
Keywords: | obfuscation added |
---|
comment:2 by , 11 years ago
Milestone: | next-minor-0.12.x → 0.12.6 |
---|---|
Owner: | set to |
Status: | new → assigned |
follow-up: 6 comment:3 by , 11 years ago
The patch looks good.
Do you think it would be a good idea to define in the TicketSystem
class the list of fields that might contain an email address? I quickly implemented a possible change in log:rjollos.git:t11594.2 (it would need more careful study and testing before committing).
On the one hand it would be nice to define the fields in a single location, however I worry that the change would clutter up the API too much, so maybe there is a better way. Also, we might want to consider this in another ticket so that it doesn't hold up this fix.
comment:4 by , 11 years ago
Thanks for response.
Trac currently handles as different from owner
, reporter
and cc
field, but adding properties for email fields sounds good. (The owner
and reporter
have only one of username or email address. The cc
field has multiple entries.)
Also, I don't think that @cached
decorator is needed because fields
properties is cached. The reason @cached
is used for fields
and custom_fields
is retrieving values from trac.ini via self.config
.
-
trac/ticket/api.py
diff --git a/trac/ticket/api.py b/trac/ticket/api.py index 9722435..ab1c9c0 100644
a b class TicketSystem(Component): 389 389 def get_email_fields(self): 390 390 return copy.deepcopy(self.email_fields) 391 391 392 @ cached393 def email_fields(self , db):392 @property 393 def email_fields(self): 394 394 return [f for f in self.fields 395 if f['name'] in ('reporter', 'owner', 'cc')]395 if f['name'] in ('reporter', 'owner', 'cc')] 396 396 397 397 def get_time_fields(self): 398 398 return copy.deepcopy(self.time_fields) 399 399 400 @ cached401 def time_fields(self , db):400 @property 401 def time_fields(self): 402 402 return [f for f in self.fields if f['type'] == 'time'] 403 403 404 404 def get_field_synonyms(self):
comment:5 by , 11 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
comment:6 by , 10 years ago
Replying to rjollos:
Do you think it would be a good idea to define in the
TicketSystem
class the list of fields that might contain an email address? I quickly implemented a possible change in log:rjollos.git:t11594.2 (it would need more careful study and testing before committing).
Created #11861 to investigate this further.
Proposed changes in jomae.git@t11594.