update @ Sun 10 Oct 04:29:16 EEST 2021

This commit is contained in:
Ari Archer 2021-10-10 04:29:16 +03:00
parent de965ba6e6
commit cfe45488b6
2 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ async function main() {
},
3: {
"type": 'ok',
"text": `Found user account: <b>${localStorage.getItem('username')}</b>`
"text": `Found user account: <b>${localStorage.getItem('username') ? escape_HTML(localStorage.getItem('username')) : ''}</b>`
},
4: {
"type": 'ok',

View file

@ -117,7 +117,7 @@ function su(cmd) {
if (cmd[0]) {
if (cmd[0] == '.') {
root = !root
return `Switched to the <b>${root ? 'root' : localStorage.getItem('username')}</b> user.`
return `Switched to the <b>${root ? 'root' : escape_HTML(localStorage.getItem('username'))}</b> user.`
} else {
root = true;
let ret = 'Command not found';
@ -163,7 +163,7 @@ function passwd() {
function whoami() {
return root ? "root" : window.localStorage.getItem("username");
return root ? "root" : escape_HTML(window.localStorage.getItem("username"));
}