name-color: shore up one of the last vulns
This commit is contained in:
parent
f7da042736
commit
8a5ff92104
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ async function get_name_color(name: string): Promise<string | undefined> {
|
|||
if (text.startsWith("name-color: ")) {
|
||||
const color = text.split("name-color: ")[1]
|
||||
.slice(0, MAX_COLOR_LEN)
|
||||
.replaceAll(";", "");
|
||||
.replaceAll(/[;{}"']/g, "");
|
||||
if (is_valid_color(color)) {
|
||||
return color;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue