Comment #1 on issue 3274 by uchida...@gmail.com: xss in autocomplete
http://code.google.com/p/reviewboard/issues/detail?id=3274

A mistake. Do not need to be escaped term.


Index: reviewboard/htdocs/media/rb/js/ui.autocomplete.js
===================================================================
diff --git a/trunk/reviewboard/htdocs/media/rb/js/ui.autocomplete.js b/trunk/reviewboard/htdocs/media/rb/js/ui.autocomplete.js --- a/trunk/reviewboard/htdocs/media/rb/js/ui.autocomplete.js (revision 2200)
+++ b/trunk/reviewboard/htdocs/media/rb/js/ui.autocomplete.js   (working copy)
@@ -424,7 +424,7 @@
                multiple: false,
                multipleSeparator: ", ",
                highlight: function(value, term) {
- return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"); + return $('<div>').text(value).html().replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
                },
                scroll: true,
                scrollHeight: 180


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to