fix: protect against XSS in chat names
This commit is contained in:
parent
cd8f49921f
commit
dbc1d26966
|
@ -57,7 +57,7 @@ ModalPopup {
|
|||
|
||||
function doJoin(){
|
||||
if(pubKeys.length === 0) return;
|
||||
chatsModel.createGroup(groupName.text, JSON.stringify(pubKeys));
|
||||
chatsModel.createGroup(Utils.filterXSS(groupName.text), JSON.stringify(pubKeys));
|
||||
popup.close();
|
||||
}
|
||||
|
||||
|
|
|
@ -54,8 +54,11 @@ QtObject {
|
|||
var replacePattern2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim;
|
||||
replacedText = replacedText.replace(replacePattern2, "$1<a href='http://$2'>$2</a>");
|
||||
|
||||
replacedText = XSS.filterXSS(replacedText)
|
||||
return replacedText;
|
||||
return XSS.filterXSS(replacedText)
|
||||
}
|
||||
|
||||
function filterXSS(inputText) {
|
||||
return XSS.filterXSS(inputText)
|
||||
}
|
||||
|
||||
function toLocaleString(val, locale, options) {
|
||||
|
|
Loading…
Reference in New Issue