Fixed numeric password requirement check.

Ylian Saint-Hilaire committed May 1, 2020 at 23:53 UTC 1c4e8ab60797d1007aaf5b197f37907f47e71624
7 files changed +107 -111
common.js
+3 -3
@@ -167,14 +167,14 @@ module.exports.checkPasswordRequirements = function(password, requirements) {
167 if ((requirements == null) || (requirements == '') || (typeof requirements != 'object')) return true;
168 if (requirements.min) { if (password.length < requirements.min) return false; }
169 if (requirements.max) { if (password.length > requirements.max) return false; }
170 - var num = 0, lower = 0, upper = 0, nonalpha = 0;
170 + var numeric = 0, lower = 0, upper = 0, nonalpha = 0;
171 for (var i = 0; i < password.length; i++) {
172 - if (/\d/.test(password[i])) { num++; }
172 + if (/\d/.test(password[i])) { numeric++; }
173 if (/[a-z]/.test(password[i])) { lower++; }
174 if (/[A-Z]/.test(password[i])) { upper++; }
175 if (/\W/.test(password[i])) { nonalpha++; }
176 }
177 - if (requirements.num && (num < requirements.num)) return false;
177 + if (requirements.numeric && (numeric < requirements.numeric)) return false;
178 if (requirements.lower && (lower < requirements.lower)) return false;
179 if (requirements.upper && (upper < requirements.upper)) return false;
180 if (requirements.nonalpha && (nonalpha < requirements.nonalpha)) return false;
sample-config.json
+1 -1
@@ -8,7 +8,6 @@
8 "_MongoDumpPath": "C:\\Program Files\\MongoDB\\Server\\4.2\\bin\\mongodump.exe",
9 "_WANonly": true,
10 "_LANonly": true,
11 - "_Minify": 1,
11 "_SessionTime": 30,
12 "_SessionKey": "MyReallySecretPassword1",
13 "_SessionSameSite": "strict",
@@ -91,6 +90,7 @@
90 "_TitlePicture": "title-sample.png",
91 "_UserQuota": 1048576,
92 "_MeshQuota": 248576,
93 + "Minify": true,
94 "_NewAccounts": true,
95 "_UserNameIsEmail": true,
96 "_NewAccountEmailDomains": [ "sample.com" ],
translate/translate.json
+93 -98
@@ -407,7 +407,7 @@
407 "ru": ", ",
408 "zh-chs": ",",
409 "xloc": [
410 - "default-mobile.handlebars->9->338",
410 + "default-mobile.handlebars->9->335",
411 "default.handlebars->23->1293"
412 ]
413 },
@@ -602,7 +602,7 @@
602 "ru": "...",
603 "zh-chs": "...",
604 "xloc": [
605 - "default-mobile.handlebars->9->251",
605 + "default-mobile.handlebars->9->248",
606 "default-mobile.handlebars->9->77",
607 "default.handlebars->23->1334",
608 "default.handlebars->23->1643",
@@ -671,7 +671,7 @@
671 "ru": "1 байт",
672 "zh-chs": "1個字節",
673 "xloc": [
674 - "default-mobile.handlebars->9->342",
674 + "default-mobile.handlebars->9->339",
675 "default-mobile.handlebars->9->87",
676 "default.handlebars->23->1353"
677 ]
@@ -1132,7 +1132,7 @@
1132 "pt": "3",
1133 "ru": "3",
1134 "xloc": [
1135 - "default-mobile.handlebars->9->277"
1135 + "default-mobile.handlebars->9->274"
1136 ]
1137 },
1138 {
@@ -2441,7 +2441,7 @@
2441 "ru": "Добавить пользователя",
2442 "zh-chs": "添加用戶",
2443 "xloc": [
2444 - "default-mobile.handlebars->9->288",
2444 + "default-mobile.handlebars->9->285",
2445 "default.handlebars->23->556"
2446 ]
2447 },
@@ -2494,7 +2494,7 @@
2494 "ja": "ユーザーをデバイスグループに追加",
2495 "nl": "Gebruiker toevoegen aan apparaatgroep",
2496 "xloc": [
2497 - "default-mobile.handlebars->9->317"
2497 + "default-mobile.handlebars->9->314"
2498 ]
2499 },
2500 {
@@ -2905,7 +2905,7 @@
2905 "ru": "Консоль агента",
2906 "zh-chs": "代理控制台",
2907 "xloc": [
2908 - "default-mobile.handlebars->9->323",
2908 + "default-mobile.handlebars->9->320",
2909 "default.handlebars->23->1276"
2910 ]
2911 },
@@ -3149,8 +3149,8 @@
3149 "ru": "Все",
3150 "zh-chs": "所有",
3151 "xloc": [
3152 - "default-mobile.handlebars->9->252",
3153 - "default-mobile.handlebars->9->254",
3152 + "default-mobile.handlebars->9->249",
3153 + "default-mobile.handlebars->9->251",
3154 "default-mobile.handlebars->9->86"
3155 ]
3156 },
@@ -3858,7 +3858,7 @@
3858 "ru": "Вы действительно хотите удалить группу \\\"{0}\\\"? Удаление группы приведет к удалению всей информации связанной с устройствами в этой группе.",
3859 "zh-chs": "您確定要刪除組{0}嗎?刪除設備組還將刪除該組中有關設備的所有信息。",
3860 "xloc": [
3861 - "default-mobile.handlebars->9->294",
3861 + "default-mobile.handlebars->9->291",
3862 "default.handlebars->23->1203"
3863 ]
3864 },
@@ -5135,8 +5135,8 @@
5135 "ru": "Чаты и уведомления",
5136 "zh-chs": "聊天並通知",
5137 "xloc": [
5138 - "default-mobile.handlebars->9->315",
5139 - "default-mobile.handlebars->9->333",
5138 + "default-mobile.handlebars->9->312",
5139 + "default-mobile.handlebars->9->330",
5140 "default.handlebars->23->1253",
5141 "default.handlebars->23->1287"
5142 ]
@@ -5402,10 +5402,10 @@
5402 "zh-chs": "明確",
5403 "xloc": [
5404 "default-mobile.handlebars->9->101",
5405 - "default-mobile.handlebars->9->270",
5406 - "default-mobile.handlebars->9->272",
5407 - "default-mobile.handlebars->9->274",
5408 - "default-mobile.handlebars->9->276",
5405 + "default-mobile.handlebars->9->267",
5406 + "default-mobile.handlebars->9->269",
5407 + "default-mobile.handlebars->9->271",
5408 + "default-mobile.handlebars->9->273",
5409 "default-mobile.handlebars->9->28",
5410 "default.handlebars->23->1368",
5411 "default.handlebars->23->741",
@@ -5775,7 +5775,7 @@
5775 "zh-chs": "確認",
5776 "xloc": [
5777 "default-mobile.handlebars->9->230",
5778 - "default-mobile.handlebars->9->295",
5778 + "default-mobile.handlebars->9->292",
5779 "default.handlebars->23->1204",
5780 "default.handlebars->23->1417",
5781 "default.handlebars->23->1480",
@@ -5800,7 +5800,7 @@
5800 "ru": "Подтвердить копирование 1 записи в это расположение?",
5801 "zh-chs": "確認將1個副本複製到此位置?",
5802 "xloc": [
5803 - "default-mobile.handlebars->9->265",
5803 + "default-mobile.handlebars->9->262",
5804 "default.handlebars->23->736"
5805 ]
5806 },
@@ -5818,7 +5818,7 @@
5818 "ru": "Подтвердить копирование {0} записей в это расположение?",
5819 "zh-chs": "確認{0}個條目的副本到此位置?",
5820 "xloc": [
5821 - "default-mobile.handlebars->9->264",
5821 + "default-mobile.handlebars->9->261",
5822 "default.handlebars->23->735"
5823 ]
5824 },
@@ -5906,7 +5906,7 @@
5906 "ru": "Подтвердить перемещение 1 записи в это расположение?",
5907 "zh-chs": "確認將1個入口移動到此位置?",
5908 "xloc": [
5909 - "default-mobile.handlebars->9->267",
5909 + "default-mobile.handlebars->9->264",
5910 "default.handlebars->23->738"
5911 ]
5912 },
@@ -5924,7 +5924,7 @@
5924 "ru": "Подтвердить перемещение {0} записей в это расположение?",
5925 "zh-chs": "確認將{0}個條目移到此位置?",
5926 "xloc": [
5927 - "default-mobile.handlebars->9->266",
5927 + "default-mobile.handlebars->9->263",
5928 "default.handlebars->23->737"
5929 ]
5930 },
@@ -6088,7 +6088,7 @@
6088 "ru": "Подтвердить удаление пользователя {0}?",
6089 "zh-chs": "確認刪除用戶{0}?",
6090 "xloc": [
6091 - "default-mobile.handlebars->9->341"
6091 + "default-mobile.handlebars->9->338"
6092 ]
6093 },
6094 {
@@ -6289,7 +6289,7 @@
6289 "zh-chs": "正在連線...",
6290 "xloc": [
6291 "default-mobile.handlebars->9->2",
6292 - "default-mobile.handlebars->9->280",
6292 + "default-mobile.handlebars->9->277",
6293 "default-mobile.handlebars->9->6",
6294 "default.handlebars->23->204",
6295 "default.handlebars->23->207",
@@ -7242,7 +7242,7 @@
7242 "ru": "Удалить",
7243 "zh-chs": "刪除",
7244 "xloc": [
7245 - "default-mobile.handlebars->9->257",
7245 + "default-mobile.handlebars->9->254",
7246 "default-mobile.handlebars->9->91",
7247 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->2->1->1",
7248 "default-mobile.handlebars->container->page_content->column_l->p5->p5myfiles->p5toolbar->1->0->1->1",
@@ -7316,8 +7316,8 @@
7316 "ru": "Удалить группу",
7317 "zh-chs": "刪除群組",
7318 "xloc": [
7319 + "default-mobile.handlebars->9->290",
7320 "default-mobile.handlebars->9->293",
7320 - "default-mobile.handlebars->9->296",
7321 "default.handlebars->23->1175",
7322 "default.handlebars->23->1205"
7323 ]
@@ -7494,7 +7494,7 @@
7494 "ru": "Удалить выбранные элементы?",
7495 "zh-chs": "刪除所選項目?",
7496 "xloc": [
7497 - "default-mobile.handlebars->9->259",
7497 + "default-mobile.handlebars->9->256",
7498 "default-mobile.handlebars->9->93",
7499 "default.handlebars->23->1359",
7500 "default.handlebars->23->730"
@@ -7531,7 +7531,7 @@
7531 "ru": "Удалить {0} выбранных элементов?",
7532 "zh-chs": "刪除{0}個所選項目?",
7533 "xloc": [
7534 - "default-mobile.handlebars->9->258",
7534 + "default-mobile.handlebars->9->255",
7535 "default-mobile.handlebars->9->92",
7536 "default.handlebars->23->1358",
7537 "default.handlebars->23->729"
@@ -7631,8 +7631,8 @@
7631 "default-mobile.handlebars->9->151",
7632 "default-mobile.handlebars->9->152",
7633 "default-mobile.handlebars->9->234",
7634 - "default-mobile.handlebars->9->285",
7635 - "default-mobile.handlebars->9->298",
7634 + "default-mobile.handlebars->9->282",
7635 + "default-mobile.handlebars->9->295",
7636 "default-mobile.handlebars->9->70",
7637 "default.handlebars->23->1099",
7638 "default.handlebars->23->1124",
@@ -7910,7 +7910,7 @@
7910 "ru": "Пользователь группы устройств",
7911 "zh-chs": "設備組用戶",
7912 "xloc": [
7913 - "default-mobile.handlebars->9->339",
7913 + "default-mobile.handlebars->9->336",
7914 "default.handlebars->23->1294"
7915 ]
7916 },
@@ -8643,7 +8643,7 @@
8643 "ru": "Скачать файл",
8644 "zh-chs": "下載文件",
8645 "xloc": [
8646 - "default-mobile.handlebars->9->278",
8646 + "default-mobile.handlebars->9->275",
8647 "default.handlebars->23->748"
8648 ]
8649 },
@@ -9244,9 +9244,9 @@
9244 "ru": "Редактировать группу устройств",
9245 "zh-chs": "編輯設備組",
9246 "xloc": [
9247 - "default-mobile.handlebars->9->299",
9248 - "default-mobile.handlebars->9->301",
9249 - "default-mobile.handlebars->9->319",
9247 + "default-mobile.handlebars->9->296",
9248 + "default-mobile.handlebars->9->298",
9249 + "default-mobile.handlebars->9->316",
9250 "default.handlebars->23->1208",
9251 "default.handlebars->23->1238",
9252 "default.handlebars->23->1260",
@@ -9319,7 +9319,7 @@
9319 "ru": "Редактировать примечания устройства",
9320 "zh-chs": "編輯設備說明",
9321 "xloc": [
9322 - "default-mobile.handlebars->9->313",
9322 + "default-mobile.handlebars->9->310",
9323 "default.handlebars->23->1251"
9324 ]
9325 },
@@ -9395,7 +9395,7 @@
9395 "ru": "Редактировать примечания",
9396 "zh-chs": "編輯筆記",
9397 "xloc": [
9398 - "default-mobile.handlebars->9->326",
9398 + "default-mobile.handlebars->9->323",
9399 "default.handlebars->23->1279"
9400 ]
9401 },
@@ -10493,7 +10493,7 @@
10493 "ru": "Редактор файлов",
10494 "zh-chs": "文件編輯器",
10495 "xloc": [
10496 - "default-mobile.handlebars->9->262",
10496 + "default-mobile.handlebars->9->259",
10497 "default.handlebars->23->424",
10498 "default.handlebars->23->733"
10499 ]
@@ -11032,9 +11032,9 @@
11032 "ru": "Администратор с полным доступом",
11033 "zh-chs": "正式管理員",
11034 "xloc": [
11035 - "default-mobile.handlebars->9->291",
11036 - "default-mobile.handlebars->9->300",
11037 - "default-mobile.handlebars->9->318",
11035 + "default-mobile.handlebars->9->288",
11036 + "default-mobile.handlebars->9->297",
11037 + "default-mobile.handlebars->9->315",
11038 "default-mobile.handlebars->9->74",
11039 "default.handlebars->23->1108",
11040 "default.handlebars->23->1237",
@@ -11930,7 +11930,7 @@
11930 "ru": "Задержана 1 запись для копирования",
11931 "zh-chs": "持有1份副本",
11932 "xloc": [
11933 - "default-mobile.handlebars->9->271",
11933 + "default-mobile.handlebars->9->268",
11934 "default.handlebars->23->742"
11935 ]
11936 },
@@ -11948,7 +11948,7 @@
11948 "ru": "Задержана 1 запись для перемещения",
11949 "zh-chs": "持有1個搬家公司",
11950 "xloc": [
11951 - "default-mobile.handlebars->9->275",
11951 + "default-mobile.handlebars->9->272",
11952 "default.handlebars->23->746"
11953 ]
11954 },
@@ -11966,7 +11966,7 @@
11966 "ru": "Задержано {0} записей для копирования",
11967 "zh-chs": "保留{0}個條目進行複制",
11968 "xloc": [
11969 - "default-mobile.handlebars->9->269",
11969 + "default-mobile.handlebars->9->266",
11970 "default.handlebars->23->740"
11971 ]
11972 },
@@ -11984,7 +11984,7 @@
11984 "ru": "Задержано {0} записей для перемещения",
11985 "zh-chs": "保留{0}個條目以進行移動",
11986 "xloc": [
11987 - "default-mobile.handlebars->9->273",
11987 + "default-mobile.handlebars->9->270",
11988 "default.handlebars->23->744"
11989 ]
11990 },
@@ -12983,7 +12983,7 @@
12983 "ru": "Только Intel&reg; AMT, без агента",
12984 "zh-chs": "僅限英特爾&reg;AMT,無代理",
12985 "xloc": [
12986 - "default-mobile.handlebars->9->282",
12986 + "default-mobile.handlebars->9->279",
12987 "default.handlebars->23->1098",
12988 "default.handlebars->23->1122"
12989 ]
@@ -14457,7 +14457,7 @@
14457 "ru": "Ограниченный ввод",
14458 "zh-chs": "有限輸入",
14459 "xloc": [
14460 - "default-mobile.handlebars->9->331",
14460 + "default-mobile.handlebars->9->328",
14461 "default.handlebars->23->1285",
14462 "default.handlebars->23->569",
14463 "default.handlebars->23->588"
@@ -14477,7 +14477,7 @@
14477 "ru": "Ограничить элементы ввода",
14478 "zh-chs": "僅限於輸入",
14479 "xloc": [
14480 - "default-mobile.handlebars->9->306",
14480 + "default-mobile.handlebars->9->303",
14481 "default.handlebars->23->1243"
14482 ]
14483 },
@@ -15579,8 +15579,8 @@
15579 "ru": "Управление компьютерами группы устройств",
15580 "zh-chs": "管理設備組計算機",
15581 "xloc": [
15582 - "default-mobile.handlebars->9->303",
15583 - "default-mobile.handlebars->9->321",
15582 + "default-mobile.handlebars->9->300",
15583 + "default-mobile.handlebars->9->318",
15584 "default.handlebars->23->1240",
15585 "default.handlebars->23->1274"
15586 ]
@@ -15599,8 +15599,8 @@
15599 "ru": "Управление пользователями группы устройств",
15600 "zh-chs": "管理設備組用戶",
15601 "xloc": [
15602 - "default-mobile.handlebars->9->302",
15603 - "default-mobile.handlebars->9->320",
15602 + "default-mobile.handlebars->9->299",
15603 + "default-mobile.handlebars->9->317",
15604 "default.handlebars->23->1239",
15605 "default.handlebars->23->1273"
15606 ]
@@ -15784,7 +15784,7 @@
15784 "ru": "Управляется с помощью программного агента",
15785 "zh-chs": "使用軟件代理進行管理",
15786 "xloc": [
15787 - "default-mobile.handlebars->9->283",
15787 + "default-mobile.handlebars->9->280",
15788 "default.handlebars->23->1123"
15789 ]
15790 },
@@ -16021,7 +16021,7 @@
16021 "ru": "Консоль Mesh Agent",
16022 "zh-chs": "網格代理控制台",
16023 "xloc": [
16024 - "default-mobile.handlebars->9->310",
16024 + "default-mobile.handlebars->9->307",
16025 "default.handlebars->23->1248"
16026 ]
16027 },
@@ -16957,8 +16957,8 @@
16957 "zh-chs": "名稱",
16958 "xloc": [
16959 "default-mobile.handlebars->9->145",
16960 - "default-mobile.handlebars->9->284",
16961 - "default-mobile.handlebars->9->297",
16960 + "default-mobile.handlebars->9->281",
16961 + "default-mobile.handlebars->9->294",
16962 "default-mobile.handlebars->9->66",
16963 "default-mobile.handlebars->container->page_content->column_l->p10->p10desktop->deskarea3->deskarea3x->DeskTools->5->1->1",
16964 "default.handlebars->23->1095",
@@ -17179,7 +17179,7 @@
17179 "ru": "Новая папка",
17180 "zh-chs": "新建文件夾",
17181 "xloc": [
17182 - "default-mobile.handlebars->9->255",
17182 + "default-mobile.handlebars->9->252",
17183 "default-mobile.handlebars->9->89",
17184 "default.handlebars->23->1355",
17185 "default.handlebars->23->726",
@@ -17375,7 +17375,7 @@
17375 "ru": "Нет доступа к файлам",
17376 "zh-chs": "沒有文件訪問",
17377 "xloc": [
17378 - "default-mobile.handlebars->9->308",
17378 + "default-mobile.handlebars->9->305",
17379 "default.handlebars->23->1246"
17380 ]
17381 },
@@ -17393,7 +17393,7 @@
17393 "ru": "Файлов нет",
17394 "zh-chs": "沒有文件",
17395 "xloc": [
17396 - "default-mobile.handlebars->9->329",
17396 + "default-mobile.handlebars->9->326",
17397 "default.handlebars->23->1283",
17398 "default.handlebars->23->567",
17399 "default.handlebars->23->586"
@@ -17428,8 +17428,8 @@
17428 "ru": "Нет Intel&reg; AMT",
17429 "zh-chs": "沒有英特爾&reg;AMT",
17430 "xloc": [
17431 - "default-mobile.handlebars->9->309",
17432 - "default-mobile.handlebars->9->330",
17431 + "default-mobile.handlebars->9->306",
17432 + "default-mobile.handlebars->9->327",
17433 "default.handlebars->23->1247",
17434 "default.handlebars->23->1284"
17435 ]
@@ -17552,8 +17552,8 @@
17552 "ru": "Нет прав",
17553 "zh-chs": "沒有權利",
17554 "xloc": [
17555 - "default-mobile.handlebars->9->292",
17556 - "default-mobile.handlebars->9->335",
17555 + "default-mobile.handlebars->9->289",
17556 + "default-mobile.handlebars->9->332",
17557 "default-mobile.handlebars->9->75",
17558 "default.handlebars->23->1109",
17559 "default.handlebars->23->1289",
@@ -17594,7 +17594,7 @@
17594 "ru": "Нет терминала",
17595 "zh-chs": "沒有終端",
17596 "xloc": [
17597 - "default-mobile.handlebars->9->328",
17597 + "default-mobile.handlebars->9->325",
17598 "default.handlebars->23->1282",
17599 "default.handlebars->23->566",
17600 "default.handlebars->23->585"
@@ -17614,7 +17614,7 @@
17614 "ru": "Нет доступа к терминалу",
17615 "zh-chs": "沒有終端訪問",
17616 "xloc": [
17617 - "default-mobile.handlebars->9->307",
17617 + "default-mobile.handlebars->9->304",
17618 "default.handlebars->23->1245"
17619 ]
17620 },
@@ -18035,8 +18035,8 @@
18035 "default-mobile.handlebars->9->148",
18036 "default-mobile.handlebars->9->150",
18037 "default-mobile.handlebars->9->206",
18038 - "default-mobile.handlebars->9->253",
18039 - "default-mobile.handlebars->9->286",
18038 + "default-mobile.handlebars->9->250",
18039 + "default-mobile.handlebars->9->283",
18040 "default-mobile.handlebars->9->85",
18041 "default.handlebars->23->1119",
18042 "default.handlebars->23->1125",
@@ -18561,7 +18561,7 @@
18561 "ru": "Редактировать файлы можно только размером менее 200КБ.",
18562 "zh-chs": "只能編輯小於200k的文件。",
18563 "xloc": [
18564 - "default-mobile.handlebars->9->263",
18564 + "default-mobile.handlebars->9->260",
18565 "default.handlebars->23->425",
18566 "default.handlebars->23->734"
18567 ]
@@ -18908,7 +18908,7 @@
18908 "ru": "Частичные права",
18909 "zh-chs": "部分權利",
18910 "xloc": [
18911 - "default-mobile.handlebars->9->290",
18911 + "default-mobile.handlebars->9->287",
18912 "default-mobile.handlebars->9->73",
18913 "default.handlebars->23->1107"
18914 ]
@@ -19190,7 +19190,7 @@
19190 "ru": "Вставить",
19191 "zh-chs": "糊",
19192 "xloc": [
19193 - "default-mobile.handlebars->9->268",
19193 + "default-mobile.handlebars->9->265",
19194 "default-mobile.handlebars->9->97",
19195 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->2->1->3",
19196 "default-mobile.handlebars->container->page_content->column_l->p5->p5myfiles->p5toolbar->1->0->1->3",
@@ -19357,7 +19357,7 @@
19357 "ru": "Права",
19358 "zh-chs": "權限",
19359 "xloc": [
19360 - "default-mobile.handlebars->9->337",
19360 + "default-mobile.handlebars->9->334",
19361 "default.handlebars->23->1292",
19362 "default.handlebars->23->1385"
19363 ]
@@ -20345,7 +20345,7 @@
20345 "ru": "Рекурсивное удаление",
20346 "zh-chs": "遞歸刪除",
20347 "xloc": [
20348 - "default-mobile.handlebars->9->256",
20348 + "default-mobile.handlebars->9->253",
20349 "default-mobile.handlebars->9->90",
20350 "default.handlebars->23->1356",
20351 "default.handlebars->23->727"
@@ -20601,8 +20601,8 @@
20601 "ru": "Удаленное управление",
20602 "zh-chs": "遙控",
20603 "xloc": [
20604 - "default-mobile.handlebars->9->304",
20605 - "default-mobile.handlebars->9->322",
20604 + "default-mobile.handlebars->9->301",
20605 + "default-mobile.handlebars->9->319",
20606 "default.handlebars->23->1241",
20607 "default.handlebars->23->1275"
20608 ]
@@ -20657,7 +20657,7 @@
20657 "ru": "Удаленный пользователь Mesh",
20658 "zh-chs": "遠程網狀用戶",
20659 "xloc": [
20660 - "default-mobile.handlebars->9->340"
20660 + "default-mobile.handlebars->9->337"
20661 ]
20662 },
20663 {
@@ -20688,8 +20688,8 @@
20688 "ru": "Только просмотр экрана без ввода",
20689 "zh-chs": "僅遠程查看",
20690 "xloc": [
20691 - "default-mobile.handlebars->9->305",
20692 - "default-mobile.handlebars->9->327",
20691 + "default-mobile.handlebars->9->302",
20692 + "default-mobile.handlebars->9->324",
20693 "default.handlebars->23->1242",
20694 "default.handlebars->23->1280"
20695 ]
@@ -21030,7 +21030,7 @@
21030 "ru": "Переименовать",
21031 "zh-chs": "改名",
21032 "xloc": [
21033 - "default-mobile.handlebars->9->260",
21033 + "default-mobile.handlebars->9->257",
21034 "default-mobile.handlebars->9->94",
21035 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->2->1->1",
21036 "default-mobile.handlebars->container->page_content->column_l->p5->p5myfiles->p5toolbar->1->0->1->1",
@@ -21380,7 +21380,7 @@
21380 "ru": "Root/Корень",
21381 "zh-chs": "根",
21382 "xloc": [
21383 - "default-mobile.handlebars->9->250",
21383 + "default-mobile.handlebars->9->247",
21384 "default-mobile.handlebars->9->76",
21385 "default.handlebars->23->1333",
21386 "default.handlebars->23->721"
@@ -22128,7 +22128,7 @@
22128 "ru": "Только собственные события",
22129 "zh-chs": "僅自我事件",
22130 "xloc": [
22131 - "default-mobile.handlebars->9->332",
22131 + "default-mobile.handlebars->9->329",
22132 "default.handlebars->23->1286"
22133 ]
22134 },
@@ -22444,8 +22444,8 @@
22444 "ru": "Серверные файлы",
22445 "zh-chs": "服務器文件",
22446 "xloc": [
22447 - "default-mobile.handlebars->9->311",
22448 - "default-mobile.handlebars->9->324",
22447 + "default-mobile.handlebars->9->308",
22448 + "default-mobile.handlebars->9->321",
22449 "default.handlebars->23->1249",
22450 "default.handlebars->23->1277",
22451 "default.handlebars->23->1456",
@@ -23029,7 +23029,7 @@
23029 "ru": "Показывать только собственные события",
23030 "zh-chs": "只顯示自己的事件",
23031 "xloc": [
23032 - "default-mobile.handlebars->9->314",
23032 + "default-mobile.handlebars->9->311",
23033 "default.handlebars->23->1252"
23034 ]
23035 },
@@ -25683,7 +25683,7 @@
25683 "ru": "Удаленный ввод",
25684 "zh-chs": "類型",
25685 "xloc": [
25686 - "default-mobile.handlebars->9->287",
25686 + "default-mobile.handlebars->9->284",
25687 "default-mobile.handlebars->9->67",
25688 "default.handlebars->23->1096",
25689 "default.handlebars->23->1126",
@@ -25936,7 +25936,7 @@
25936 "ru": "Удаление",
25937 "zh-chs": "卸載",
25938 "xloc": [
25939 - "default-mobile.handlebars->9->334",
25939 + "default-mobile.handlebars->9->331",
25940 "default.handlebars->23->1288",
25941 "default.handlebars->23->578",
25942 "default.handlebars->23->597"
@@ -25956,7 +25956,7 @@
25956 "ru": "Удаление агента",
25957 "zh-chs": "卸載代理",
25958 "xloc": [
25959 - "default-mobile.handlebars->9->316",
25959 + "default-mobile.handlebars->9->313",
25960 "default.handlebars->23->1254",
25961 "default.handlebars->23->383",
25962 "default.handlebars->23->611"
@@ -26025,7 +26025,7 @@
26025 "ru": "Неизвестно #{0}",
26026 "zh-chs": "未知#{0}",
26027 "xloc": [
26028 - "default-mobile.handlebars->9->281",
26028 + "default-mobile.handlebars->9->278",
26029 "default.handlebars->23->1121"
26030 ]
26031 },
@@ -26253,8 +26253,8 @@
26253 "ru": "Загрузить файл",
26254 "zh-chs": "上傳文件",
26255 "xloc": [
26256 - "default-mobile.handlebars->9->261",
26257 - "default-mobile.handlebars->9->279",
26256 + "default-mobile.handlebars->9->258",
26257 + "default-mobile.handlebars->9->276",
26258 "default-mobile.handlebars->9->95",
26259 "default.handlebars->23->1361",
26260 "default.handlebars->23->1369",
@@ -26483,7 +26483,7 @@
26483 "ru": "Пользователь",
26484 "zh-chs": "用戶",
26485 "xloc": [
26486 - "default-mobile.handlebars->9->336",
26486 + "default-mobile.handlebars->9->333",
26487 "default.handlebars->23->1174",
26488 "default.handlebars->23->1397",
26489 "default.handlebars->23->1500",
@@ -26559,7 +26559,7 @@
26559 "ru": "Полномочия пользователя",
26560 "zh-chs": "用戶授權",
26561 "xloc": [
26562 - "default-mobile.handlebars->9->289",
26562 + "default-mobile.handlebars->9->286",
26563 "default.handlebars->23->1172",
26564 "default.handlebars->23->558"
26565 ]
@@ -27322,8 +27322,8 @@
27322 "ru": "Разбудить устройства",
27323 "zh-chs": "喚醒設備",
27324 "xloc": [
27325 - "default-mobile.handlebars->9->312",
27326 - "default-mobile.handlebars->9->325",
27325 + "default-mobile.handlebars->9->309",
27326 + "default-mobile.handlebars->9->322",
27327 "default.handlebars->23->1250",
27328 "default.handlebars->23->1278"
27329 ]
@@ -28483,12 +28483,7 @@
28483 "nl": "\\\\",
28484 "pt": "\\\\",
28485 "ru": "\\\\",
28486 - "zh-chs": "\\\\",
28487 - "xloc": [
28488 - "default-mobile.handlebars->9->247",
28489 - "default-mobile.handlebars->9->248",
28490 - "default-mobile.handlebars->9->249"
28491 - ]
28486 + "zh-chs": "\\\\"
28487 },
28488 {
28489 "cs": "\\\\'",
views/default-mobile.handlebars
+3 -3
@@ -1455,14 +1455,14 @@
1455 if ((requirements == null) || (requirements == '') || (typeof requirements != 'object')) return true;
1456 if (requirements.min) { if (password.length < requirements.min) return false; }
1457 if (requirements.max) { if (password.length > requirements.max) return false; }
1458 - var num = 0, lower = 0, upper = 0, nonalpha = 0;
1458 + var numeric = 0, lower = 0, upper = 0, nonalpha = 0;
1459 for (var i = 0; i < password.length; i++) {
1460 - if (/\d/.test(password[i])) { num++; }
1460 + if (/\d/.test(password[i])) { numeric++; }
1461 if (/[a-z]/.test(password[i])) { lower++; }
1462 if (/[A-Z]/.test(password[i])) { upper++; }
1463 if (/\W/.test(password[i])) { nonalpha++; }
1464 }
1465 - if (requirements.num && (num < requirements.num)) return false;
1465 + if (requirements.numeric && (numeric < requirements.numeric)) return false;
1466 if (requirements.lower && (lower < requirements.lower)) return false;
1467 if (requirements.upper && (upper < requirements.upper)) return false;
1468 if (requirements.nonalpha && (nonalpha < requirements.nonalpha)) return false;
views/default.handlebars
+3 -3
@@ -8268,14 +8268,14 @@
8268 if ((requirements == null) || (requirements == '') || (typeof requirements != 'object')) return true;
8269 if (requirements.min) { if (password.length < requirements.min) return false; }
8270 if (requirements.max) { if (password.length > requirements.max) return false; }
8271 - var num = 0, lower = 0, upper = 0, nonalpha = 0;
8271 + var numeric = 0, lower = 0, upper = 0, nonalpha = 0;
8272 for (var i = 0; i < password.length; i++) {
8273 - if (/\d/.test(password[i])) { num++; }
8273 + if (/\d/.test(password[i])) { numeric++; }
8274 if (/[a-z]/.test(password[i])) { lower++; }
8275 if (/[A-Z]/.test(password[i])) { upper++; }
8276 if (/\W/.test(password[i])) { nonalpha++; }
8277 }
8278 - if (requirements.num && (num < requirements.num)) return false;
8278 + if (requirements.numeric && (numeric < requirements.numeric)) return false;
8279 if (requirements.lower && (lower < requirements.lower)) return false;
8280 if (requirements.upper && (upper < requirements.upper)) return false;
8281 if (requirements.nonalpha && (nonalpha < requirements.nonalpha)) return false;
views/messenger.handlebars
+1 -1
@@ -57,7 +57,7 @@
57 var notification = null;
58 getUserMediaSupport(function (x) { userMediaSupport = x; })
59 var webrtcconfiguration = '{{{webrtconfig}}}';
60 - if (webrtcconfiguration == '') { webrtcconfiguration = null; } else { try { webrtcconfiguration = JSON.parse(decodeURIComponent(webrtcconfiguration)); } catch (ex) { console.log('Invalid WebRTC config: \"' + webrtcconfiguration + '\".'); webrtcconfiguration = null; } }
60 + if (webrtcconfiguration == '') { webrtcconfiguration = null; } else { try { webrtcconfiguration = JSON.parse(decodeURIComponent(webrtcconfiguration)); } catch (ex) { console.log('Invalid WebRTC config: "' + webrtcconfiguration + '".'); webrtcconfiguration = null; } }
61
62 // File transfer state
63 var fileUploads = [];
webserver.js
+3 -2
@@ -4746,7 +4746,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
4746
4747 // Return the correct render page given mobile, minify and override path.
4748 function getRenderPage(pagename, req, domain) {
4749 - var mobile = isMobileBrowser(req), minify = obj.args.minify && !req.query.nominify, p;
4749 + var mobile = isMobileBrowser(req), minify = (domain.minify == true), p;
4750 + if (req.query.minify == '1') { minify = true; } else if (req.query.minify == '0') { minify = false; }
4751 if (mobile) {
4752 if ((domain != null) && (domain.webviewspath != null)) { // If the domain has a web views path, use that first
4753 if (minify) {
@@ -4798,7 +4799,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
4799
4800 // Return the correct render page arguments.
4801 function getRenderArgs(xargs, domain) {
4801 - xargs.min = obj.args.minify?'-min':'';
4802 + xargs.min = domain.minify?'-min':'';
4803 xargs.titlehtml = domain.titlehtml;
4804 xargs.title = (domain.title != null) ? domain.title : 'MeshCentral';
4805 if ((domain.titlepicture == null) && (domain.titlehtml == null)) {