Opened 10 years ago
Closed 10 years ago
#11999 closed defect (fixed)
Several messages should be escaped in ticketlog.js
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | TracTicketChangelogPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description (last modified by )
I found XSS vulnerabilities in ticketlog.js.
result.msg_query_err
in tracticketchangelogplugin/0.12/ticketlog/htdocs/ticketlog.js@14183:8#L5result.msg_tkt_rev_head
in tracticketchangelogplugin/0.12/ticketlog/htdocs/ticketlog.js@14183:25#L21revision.author
andin tracticketchangelogplugin/0.12/ticketlog/htdocs/ticketlog.js@14183:43,44#L39revision.message
I'll post patch for that.
Attachments (1)
Change History (10)
comment:1 Changed 10 years ago by
Changed 10 years ago by
Attachment: | t11999.diff added |
---|
comment:2 Changed 10 years ago by
Owner: | changed from Richard Liao to Jun Omae |
---|---|
Status: | new → accepted |
I just created patch, t11999.diff. I'll commit it later.
Also, I think we should use display_rev()
rather than normalize_rev()
because raw revision (40 bytes) will be displayed if git and mercurial.
-
tracticketchangelogplugin/1.0/ticketlog/web_ui.py
94 94 continue 95 95 96 96 repos = RepositoryManager(self.env).get_repository(repos_name) 97 rev = repos. normalize_rev(rev)97 rev = repos.display_rev(rev) 98 98 link = str(rev) 99 99 if repos_name: 100 100 link += '/%s' % repos_name
comment:3 Changed 10 years ago by
Both patches look good. Should revision.message
be escaped on line 52 of the patch?
comment:4 Changed 10 years ago by
Description: | modified (diff) |
---|
I misunderstood about that. revision.message
shouldn't be escaped. Output of format_to_oneliner()
is stored on it at tracticketchangelogplugin/0.12/ticketlog/web_ui.py@14192:204#L190.
comment:5 Changed 10 years ago by
If you have a chance to commit the change, then I'll close out #12143 this weekend and tag a new release. Thanks for your help with the plugin!
comment:9 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
I'd forgotten about this. I pushed the patch and proposed changes in comment:2.
Thanks. Please feel free to push changes for this plugin at any time. I made a few attempts to get in touch with richard through tickets some time ago, and then pushed ahead with making changes when there was no reply.