mirror of
https://git.ari.lt/ari.lt/ari.lt.git
synced 2025-02-04 17:49:24 +01:00
update @ Sun 10 Oct 04:29:16 EEST 2021
This commit is contained in:
parent
de965ba6e6
commit
cfe45488b6
2 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ async function main() {
|
||||||
},
|
},
|
||||||
3: {
|
3: {
|
||||||
"type": 'ok',
|
"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: {
|
4: {
|
||||||
"type": 'ok',
|
"type": 'ok',
|
||||||
|
|
|
@ -117,7 +117,7 @@ function su(cmd) {
|
||||||
if (cmd[0]) {
|
if (cmd[0]) {
|
||||||
if (cmd[0] == '.') {
|
if (cmd[0] == '.') {
|
||||||
root = !root
|
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 {
|
} else {
|
||||||
root = true;
|
root = true;
|
||||||
let ret = 'Command not found';
|
let ret = 'Command not found';
|
||||||
|
@ -163,7 +163,7 @@ function passwd() {
|
||||||
|
|
||||||
|
|
||||||
function whoami() {
|
function whoami() {
|
||||||
return root ? "root" : window.localStorage.getItem("username");
|
return root ? "root" : escape_HTML(window.localStorage.getItem("username"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue