mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Remove "referer" from js_config.
Removes XSS reported by jomkr where referer contains "</script>" in IE.
This commit is contained in:
@@ -120,8 +120,6 @@ def js_config():
|
||||
"post_site": c.site.name if not c.default_sr else "",
|
||||
# are we in an iframe?
|
||||
"cnameframe": bool(c.cname and not c.authorized_cname),
|
||||
# this page's referer
|
||||
"referer": _force_unicode(request.referer) or "",
|
||||
# the user's voting hash
|
||||
"modhash": c.modhash or False,
|
||||
# the current rendering style
|
||||
|
||||
@@ -384,7 +384,7 @@ function unsubscribe(reddit_name) {
|
||||
function friend(user_name, container_name, type) {
|
||||
return function() {
|
||||
if (reddit.logged) {
|
||||
encoded = encodeURIComponent(reddit.referer);
|
||||
encoded = encodeURIComponent(document.referrer);
|
||||
$.request("friend?note=" + encoded,
|
||||
{name: user_name, container: container_name, type: type});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user