mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-01 20:43:33 +00:00
CVE-2020-24582: Escape all strings interpolated into HTML.
Also fix various variable names to consistently indicate which strings contain HTML. Some of these changes close cross-site scripting vulnerabilities, and others are for consistency. It’s important to be meticulously consistent about escaping so that changes that would introduce vulnerabilities stand out as obviously wrong. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import path from 'path';
|
||||
import stream from 'stream';
|
||||
import util from 'util';
|
||||
|
||||
import escape from 'escape-html';
|
||||
import getStream from 'get-stream';
|
||||
|
||||
import {ServerConf} from '../renderer/js/utils/domain-util';
|
||||
@@ -73,7 +72,7 @@ export const _getServerSettings = async (domain: string, session: Electron.sessi
|
||||
// Following check handles both the cases
|
||||
icon: realm_icon.startsWith('/') ? realm_uri + realm_icon : realm_icon,
|
||||
url: realm_uri,
|
||||
alias: escape(realm_name)
|
||||
alias: realm_name
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user