mirror of https://github.com/calzoneman/sync.git
Fix behavior of chat filter XSS
This commit is contained in:
parent
9d445b8ffd
commit
408f6626bb
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Sep 12 13:01 2013 CDT
|
||||||
|
* lib/channel.js: Fix the XSS filter hack that allows style attributes
|
||||||
|
to allow more than one in a chat filter replacement
|
||||||
|
|
||||||
Wed Sep 11 22:13 2013 CDT
|
Wed Sep 11 22:13 2013 CDT
|
||||||
* lib/channel.js, lib/user.js: Remove "afkers" array, replace afkcount
|
* lib/channel.js, lib/user.js: Remove "afkers" array, replace afkcount
|
||||||
with a function that calculates how many users are eligible to
|
with a function that calculates how many users are eligible to
|
||||||
|
|
|
@ -1853,9 +1853,10 @@ Channel.prototype.tryUpdateFilter = function(user, f) {
|
||||||
var re = f.source;
|
var re = f.source;
|
||||||
var flags = f.flags;
|
var flags = f.flags;
|
||||||
// Temporary fix
|
// Temporary fix
|
||||||
f.replace = f.replace.replace("style", "stlye");
|
// 2013-09-12 Temporary my ass
|
||||||
|
f.replace = f.replace.replace(/style/g, "stlye");
|
||||||
f.replace = sanitize(f.replace).xss();
|
f.replace = sanitize(f.replace).xss();
|
||||||
f.replace = f.replace.replace("stlye", "style");
|
f.replace = f.replace.replace(/stlye/g, "style");
|
||||||
try {
|
try {
|
||||||
new RegExp(re, flags);
|
new RegExp(re, flags);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue