mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-12-19 21:07:03 +01:00
Fixed issues reported by cure53.de
Fixed issues CLP-01-014 and CLP-01-015
This commit is contained in:
@@ -246,6 +246,34 @@ MochiKit.Base.update(Clipperz.Base, {
|
||||
return result;
|
||||
},
|
||||
|
||||
'javascriptInjectionPattern': new RegExp("javascript:\/\/\"", "g"),
|
||||
|
||||
'sanitizeUrl': function(aValue) {
|
||||
var result;
|
||||
|
||||
if ((aValue != null) && this.javascriptInjectionPattern.test(aValue)) {
|
||||
result = aValue.replace(this.javascriptInjectionPattern, '');
|
||||
console.log("sanitized url", aValue, result);
|
||||
} else {
|
||||
result = aValue;
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
'sanitizeFavicon': function(aValue) {
|
||||
var result;
|
||||
|
||||
if ((aValue != null) && this.javascriptInjectionPattern.test(aValue)) {
|
||||
result = aValue.replace(this.javascriptInjectionPattern, '');
|
||||
console.log("sanitized favicon", aValue, result);
|
||||
} else {
|
||||
result = aValue;
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
'exception': {
|
||||
|
||||
Reference in New Issue
Block a user