Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/html/settings.html')
-rw-r--r--web/html/settings.html10
1 files changed, 1 insertions, 9 deletions
diff --git a/web/html/settings.html b/web/html/settings.html
index ab72bca7..82e636d9 100644
--- a/web/html/settings.html
+++ b/web/html/settings.html
@@ -319,19 +319,11 @@
this.loading(false);
await this.updateAllSetting();
},
- generateRandomString(length) {
- var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
- let randomString = "";
- for (let i = 0; i < length; i++) {
- randomString += chars[Math.floor(Math.random() * chars.length)];
- }
- return randomString;
- },
async getNewSecret() {
if (!this.changeSecret) {
this.changeSecret = true;
this.user.loginSecret = '';
- const newSecret = this.generateRandomString(64);
+ const newSecret = RandomUtil.randomSeq(64);
await PromiseUtil.sleep(1000);
this.user.loginSecret = newSecret;
this.changeSecret = false;