From 2021f9270cca16f900567e5c59981f9fd5bfad86 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 17 Mar 2020 18:15:54 -0700 Subject: [PATCH] Fixed MeshCentralRouter download. --- package.json | 2 +- translate/translate.json | 231 +++++++++++++++++++++++---------------- webserver.js | 6 +- 3 files changed, 137 insertions(+), 102 deletions(-) diff --git a/package.json b/package.json index fcc02751..461fb452 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.5.0-j", + "version": "0.5.0-k", "keywords": [ "Remote Management", "Intel AMT", diff --git a/translate/translate.json b/translate/translate.json index 390ff556..9faa8cee 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -542,7 +542,7 @@ "default-mobile.handlebars->9->246", "default-mobile.handlebars->9->70", "default.handlebars->27->1233", - "default.handlebars->27->1470", + "default.handlebars->27->1479", "default.handlebars->27->653" ] }, @@ -1823,6 +1823,12 @@ "default.handlebars->27->206" ] }, + { + "en": "Add Device", + "xloc": [ + "default.handlebars->27->1447" + ] + }, { "cs": "Přidat událost zařízení", "de": "Geräte-Ereignis hinzufügen", @@ -1851,7 +1857,7 @@ "default.handlebars->27->1169", "default.handlebars->27->1171", "default.handlebars->27->1369", - "default.handlebars->27->1447", + "default.handlebars->27->1456", "default.handlebars->27->187" ] }, @@ -1918,7 +1924,7 @@ "nl": "Lidmaatschap toevoegen", "ru": "Добавить участие", "xloc": [ - "default.handlebars->27->1466" + "default.handlebars->27->1475" ] }, { @@ -1964,7 +1970,7 @@ "xloc": [ "default.handlebars->27->1075", "default.handlebars->27->1170", - "default.handlebars->27->1456" + "default.handlebars->27->1465" ] }, { @@ -2304,7 +2310,7 @@ "nl": "Agent fout tellers", "ru": "Счетчик ошибок агента", "xloc": [ - "default.handlebars->27->1478" + "default.handlebars->27->1487" ] }, { @@ -2350,7 +2356,7 @@ "nl": "Agent Sessies", "ru": "Сессии агентов", "xloc": [ - "default.handlebars->27->1494" + "default.handlebars->27->1503" ] }, { @@ -2447,7 +2453,7 @@ "pt": "Agentes", "ru": "Агенты", "xloc": [ - "default.handlebars->27->1507" + "default.handlebars->27->1516" ] }, { @@ -3038,7 +3044,7 @@ "nl": "Weet u zeker dat u de plug-in {0} wilt gebruiken: {1}", "ru": "Вы уверенны, что {0} плагин: {1}", "xloc": [ - "default.handlebars->27->1543" + "default.handlebars->27->1552" ] }, { @@ -3359,7 +3365,7 @@ "nl": "Ongeldige handtening", "ru": "Плохой ключ", "xloc": [ - "default.handlebars->27->1485" + "default.handlebars->27->1494" ] }, { @@ -3370,7 +3376,7 @@ "nl": "Onjuist webcertificaat", "ru": "Плохой веб-сертификат", "xloc": [ - "default.handlebars->27->1484" + "default.handlebars->27->1493" ] }, { @@ -3563,7 +3569,7 @@ "pt": "Servidor CIRA", "ru": "CIRA Сервер", "xloc": [ - "default.handlebars->27->1534" + "default.handlebars->27->1543" ] }, { @@ -3577,7 +3583,7 @@ "pt": "Comandos do servidor CIRA", "ru": "CIRA Сервер команды", "xloc": [ - "default.handlebars->27->1535" + "default.handlebars->27->1544" ] }, { @@ -3588,7 +3594,7 @@ "nl": "CPU gebruik", "ru": "Загрузка CPU", "xloc": [ - "default.handlebars->27->1499" + "default.handlebars->27->1508" ] }, { @@ -3602,7 +3608,7 @@ "pt": "Carga da CPU nos últimos 15 minutos", "ru": "Загрузка CPU за последние 15 минут", "xloc": [ - "default.handlebars->27->1502" + "default.handlebars->27->1511" ] }, { @@ -3616,7 +3622,7 @@ "pt": "Carga da CPU nos últimos 5 minutos", "ru": "Загрузка CPU за последние 5 минут", "xloc": [ - "default.handlebars->27->1501" + "default.handlebars->27->1510" ] }, { @@ -3630,7 +3636,7 @@ "pt": "Carga da CPU no último minuto", "ru": "Загрузка CPU за последнюю минуту", "xloc": [ - "default.handlebars->27->1500" + "default.handlebars->27->1509" ] }, { @@ -3676,7 +3682,7 @@ "pt": "Erro de chamada", "ru": "Ошибка вызова", "xloc": [ - "default.handlebars->27->1544" + "default.handlebars->27->1553" ] }, { @@ -4018,7 +4024,7 @@ "pt": "Verificando ...", "ru": "Проверка...", "xloc": [ - "default.handlebars->27->1540", + "default.handlebars->27->1549", "default.handlebars->27->778" ] }, @@ -4322,6 +4328,12 @@ "ru": "Общие группы устройств", "xloc": [ "default.handlebars->27->1370", + "default.handlebars->27->1457" + ] + }, + { + "en": "Common Devices", + "xloc": [ "default.handlebars->27->1448" ] }, @@ -4472,7 +4484,7 @@ "ru": "Подтвердить удаление группы устройств {0}?", "xloc": [ "default.handlebars->27->1380", - "default.handlebars->27->1468" + "default.handlebars->27->1477" ] }, { @@ -4483,7 +4495,7 @@ "nl": "Bevestig het verwijderen van de groep {0}?", "ru": "Подтвердить удаление группы {0}?", "xloc": [ - "default.handlebars->27->1464" + "default.handlebars->27->1473" ] }, { @@ -4605,7 +4617,7 @@ "nl": "Verbonden Intel® AMT", "ru": "Подключено Intel® AMT", "xloc": [ - "default.handlebars->27->1490" + "default.handlebars->27->1499" ] }, { @@ -4616,7 +4628,7 @@ "nl": "Verbonden gebruikers", "ru": "Подключенные пользователи", "xloc": [ - "default.handlebars->27->1495" + "default.handlebars->27->1504" ] }, { @@ -4673,7 +4685,7 @@ "pt": "Contagem de conexões", "ru": "Подключений ", "xloc": [ - "default.handlebars->27->1506" + "default.handlebars->27->1515" ] }, { @@ -4687,7 +4699,7 @@ "pt": "Encaminhador de conexão", "ru": "Ретранслятор подключения", "xloc": [ - "default.handlebars->27->1533" + "default.handlebars->27->1542" ] }, { @@ -4774,7 +4786,7 @@ "pt": "Codificador de cookies", "ru": "Cookie-кодировщик", "xloc": [ - "default.handlebars->27->1520" + "default.handlebars->27->1529" ] }, { @@ -4983,7 +4995,7 @@ "pt": "Servidor Core", "ru": "Основной сервер", "xloc": [ - "default.handlebars->27->1519" + "default.handlebars->27->1528" ] }, { @@ -5851,7 +5863,8 @@ "default.handlebars->27->1147", "default.handlebars->27->1376", "default.handlebars->27->1454", - "default.handlebars->27->1460" + "default.handlebars->27->1463", + "default.handlebars->27->1469" ] }, { @@ -5884,7 +5897,7 @@ "default.handlebars->27->1348", "default.handlebars->27->1361", "default.handlebars->27->1416", - "default.handlebars->27->1493", + "default.handlebars->27->1502", "default.handlebars->container->column_l->p2->9" ] }, @@ -6687,7 +6700,7 @@ "nl": "Duplicaat Agent", "ru": "Скопировать агент", "xloc": [ - "default.handlebars->27->1489" + "default.handlebars->27->1498" ] }, { @@ -7584,7 +7597,7 @@ "nl": "Extern", "ru": "Внешний", "xloc": [ - "default.handlebars->27->1513" + "default.handlebars->27->1522" ] }, { @@ -7940,8 +7953,8 @@ "pt": "Livre", "ru": "Свободно", "xloc": [ - "default.handlebars->27->1474", - "default.handlebars->27->1476" + "default.handlebars->27->1483", + "default.handlebars->27->1485" ] }, { @@ -8120,6 +8133,12 @@ "xloc": [ "default.handlebars->27->1090", "default.handlebars->27->1373", + "default.handlebars->27->1460" + ] + }, + { + "en": "Full Device Rights", + "xloc": [ "default.handlebars->27->1451" ] }, @@ -8616,7 +8635,7 @@ "es": "Heap Total", "nl": "Heap Totaal", "xloc": [ - "default.handlebars->27->1515" + "default.handlebars->27->1524" ] }, { @@ -8626,7 +8645,7 @@ "es": "Heap Used", "nl": "Heap gebruikt", "xloc": [ - "default.handlebars->27->1514" + "default.handlebars->27->1523" ] }, { @@ -9148,8 +9167,8 @@ "xloc": [ "default.handlebars->27->1222", "default.handlebars->27->1228", - "default.handlebars->27->1511", - "default.handlebars->27->1532" + "default.handlebars->27->1520", + "default.handlebars->27->1541" ] }, { @@ -9711,7 +9730,7 @@ "nl": "Ongeldige apparaatgroep type", "ru": "Некорректный тип группы устройств", "xloc": [ - "default.handlebars->27->1488" + "default.handlebars->27->1497" ] }, { @@ -9722,7 +9741,7 @@ "nl": "Onjuiste JSON", "ru": "Некорректный JSON", "xloc": [ - "default.handlebars->27->1482" + "default.handlebars->27->1491" ] }, { @@ -9762,7 +9781,7 @@ "nl": "Onjuiste PKCS handtekening", "ru": "Некорректная сигнатура PKCS", "xloc": [ - "default.handlebars->27->1480" + "default.handlebars->27->1489" ] }, { @@ -9773,7 +9792,7 @@ "nl": "Ongeldige RSA handtekening", "ru": "Некорректная сигнатура RSA", "xloc": [ - "default.handlebars->27->1481" + "default.handlebars->27->1490" ] }, { @@ -10595,7 +10614,7 @@ "pt": "Menos", "ru": "Меньше", "xloc": [ - "default.handlebars->27->1546" + "default.handlebars->27->1555" ] }, { @@ -11424,7 +11443,7 @@ "pt": "Mensagens do servidor principal", "ru": "Сообщения главного сервера", "xloc": [ - "default.handlebars->27->1522" + "default.handlebars->27->1531" ] }, { @@ -11721,7 +11740,7 @@ "nl": "Max Sessies bereikt", "ru": "Достигнуто максимальное число сессий", "xloc": [ - "default.handlebars->27->1486" + "default.handlebars->27->1495" ] }, { @@ -11766,7 +11785,7 @@ "pt": "Megabytes", "ru": "Мегабайт", "xloc": [ - "default.handlebars->27->1512" + "default.handlebars->27->1521" ] }, { @@ -11780,7 +11799,7 @@ "pt": "Memória", "ru": "ОЗУ", "xloc": [ - "default.handlebars->27->1503", + "default.handlebars->27->1512", "default.handlebars->27->743", "default.handlebars->container->column_l->p40->3->1->p40type->3" ] @@ -11890,7 +11909,7 @@ "nl": "MeshAgent verkeer", "ru": "Трафик MeshAgent", "xloc": [ - "default.handlebars->27->1524" + "default.handlebars->27->1533" ] }, { @@ -11903,7 +11922,7 @@ "nl": "MeshAgent update", "ru": "Обновление MeshAgent", "xloc": [ - "default.handlebars->27->1525" + "default.handlebars->27->1534" ] }, { @@ -11983,7 +12002,7 @@ "pt": "Peering do servidor MeshCentral", "ru": "Соединения сервера MeshCentral", "xloc": [ - "default.handlebars->27->1523" + "default.handlebars->27->1532" ] }, { @@ -12175,7 +12194,7 @@ "pt": "Despachante de mensagens", "ru": "Диспетчер сообщения", "xloc": [ - "default.handlebars->27->1521" + "default.handlebars->27->1530" ] }, { @@ -12257,7 +12276,7 @@ "pt": "Mais", "ru": "Еще", "xloc": [ - "default.handlebars->27->1545" + "default.handlebars->27->1554" ] }, { @@ -12810,7 +12829,7 @@ "ru": "События не найдены", "xloc": [ "default.handlebars->27->1269", - "default.handlebars->27->1469", + "default.handlebars->27->1478", "default.handlebars->27->691" ] }, @@ -12957,7 +12976,8 @@ "default.handlebars->27->1091", "default.handlebars->27->1192", "default.handlebars->27->1374", - "default.handlebars->27->1452" + "default.handlebars->27->1452", + "default.handlebars->27->1461" ] }, { @@ -13026,7 +13046,7 @@ "ru": "Нет общих групп устройств", "xloc": [ "default.handlebars->27->1377", - "default.handlebars->27->1455" + "default.handlebars->27->1464" ] }, { @@ -13086,6 +13106,12 @@ "default.handlebars->27->430" ] }, + { + "en": "No devices in common", + "xloc": [ + "default.handlebars->27->1455" + ] + }, { "cs": "V této skupině nejsou žádná zařízení.", "de": "Keine Geräte in dieser Gerätegruppe.", @@ -13235,7 +13261,7 @@ "nl": "Geen gebruikersgroep lidmaatschap", "ru": "Нет членства в группах пользователей", "xloc": [ - "default.handlebars->27->1461" + "default.handlebars->27->1470" ] }, { @@ -13628,7 +13654,7 @@ "pt": "Ocorreu em {0}", "ru": "Произошло в {0}", "xloc": [ - "default.handlebars->27->1472" + "default.handlebars->27->1481" ] }, { @@ -13949,6 +13975,12 @@ "xloc": [ "default.handlebars->27->1089", "default.handlebars->27->1371", + "default.handlebars->27->1458" + ] + }, + { + "en": "Partial Device Rights", + "xloc": [ "default.handlebars->27->1449" ] }, @@ -14441,7 +14473,7 @@ "nl": "Plugin Actie", "ru": "Действие плагина", "xloc": [ - "default.handlebars->27->1542", + "default.handlebars->27->1551", "default.handlebars->27->159" ] }, @@ -14984,7 +15016,7 @@ "pt": "RSS", "ru": "RSS", "xloc": [ - "default.handlebars->27->1516" + "default.handlebars->27->1525" ] }, { @@ -15127,7 +15159,7 @@ "nl": "Relay geteld", "ru": "Число ретрансляций", "xloc": [ - "default.handlebars->27->1498" + "default.handlebars->27->1507" ] }, { @@ -15138,7 +15170,7 @@ "nl": "Relay fouten", "ru": "Ошибки ретранслятора", "xloc": [ - "default.handlebars->27->1491" + "default.handlebars->27->1500" ] }, { @@ -15151,8 +15183,8 @@ "pt": "Retransmissão de sessão ", "ru": "Сессии ретранслятора", "xloc": [ - "default.handlebars->27->1497", - "default.handlebars->27->1510" + "default.handlebars->27->1506", + "default.handlebars->27->1519" ] }, { @@ -15364,7 +15396,7 @@ "ru": "Удалить группу устройств.", "xloc": [ "default.handlebars->27->1379", - "default.handlebars->27->1467" + "default.handlebars->27->1476" ] }, { @@ -15375,7 +15407,7 @@ "nl": "Verwijder gebruiker", "ru": "Удалить пользователя", "xloc": [ - "default.handlebars->27->1463" + "default.handlebars->27->1472" ] }, { @@ -15448,7 +15480,7 @@ "nl": "Verwijder de groepslidmaatschap", "ru": "Удалить членство пользователя в группе", "xloc": [ - "default.handlebars->27->1459" + "default.handlebars->27->1468" ] }, { @@ -15475,7 +15507,8 @@ "xloc": [ "default.handlebars->27->1092", "default.handlebars->27->1366", - "default.handlebars->27->1453" + "default.handlebars->27->1453", + "default.handlebars->27->1462" ] }, { @@ -16485,14 +16518,14 @@ "nl": "Server Certificaat", "ru": "Сертификат сервера", "xloc": [ - "default.handlebars->27->1526" + "default.handlebars->27->1535" ] }, { "en": "Server Database", "nl": "Server Database", "xloc": [ - "default.handlebars->27->1527" + "default.handlebars->27->1536" ] }, { @@ -16577,7 +16610,7 @@ "nl": "Server Status", "ru": "Состояние сервера", "xloc": [ - "default.handlebars->27->1477" + "default.handlebars->27->1486" ] }, { @@ -16605,7 +16638,7 @@ "pt": "Rastreamento de servidor", "ru": "Трассировка сервера", "xloc": [ - "default.handlebars->27->1536" + "default.handlebars->27->1545" ] }, { @@ -16713,7 +16746,7 @@ "pt": "ServerStats.csv", "ru": "ServerStats.csv", "xloc": [ - "default.handlebars->27->1518" + "default.handlebars->27->1527" ] }, { @@ -18297,7 +18330,7 @@ "pt": "Atualmente não há notificações", "ru": "На данный момент уведомлений нет", "xloc": [ - "default.handlebars->27->1471" + "default.handlebars->27->1480" ] }, { @@ -19182,7 +19215,7 @@ "default-mobile.handlebars->9->174", "default-mobile.handlebars->9->175", "default.handlebars->27->13", - "default.handlebars->27->1462", + "default.handlebars->27->1471", "default.handlebars->27->364", "default.handlebars->27->41", "default.handlebars->27->42", @@ -19215,7 +19248,13 @@ "nl": "Onbekende actie", "ru": "Неизвестное действие", "xloc": [ - "default.handlebars->27->1483" + "default.handlebars->27->1492" + ] + }, + { + "en": "Unknown Device", + "xloc": [ + "default.handlebars->27->1450" ] }, { @@ -19227,8 +19266,8 @@ "ru": "Неизвестная группа устройств", "xloc": [ "default.handlebars->27->1372", - "default.handlebars->27->1450", - "default.handlebars->27->1487" + "default.handlebars->27->1459", + "default.handlebars->27->1496" ] }, { @@ -19239,7 +19278,7 @@ "nl": "Onbekende groep", "ru": "Неизвестная группа", "xloc": [ - "default.handlebars->27->1479" + "default.handlebars->27->1488" ] }, { @@ -19265,7 +19304,7 @@ "nl": "Onbekende gebruikersgroep", "ru": "Неизвестная группа пользователей", "xloc": [ - "default.handlebars->27->1458" + "default.handlebars->27->1467" ] }, { @@ -19326,7 +19365,7 @@ "nl": "Bijgewerkt", "ru": "Актуально", "xloc": [ - "default.handlebars->27->1541" + "default.handlebars->27->1550" ] }, { @@ -19515,8 +19554,8 @@ "pt": "Usava", "ru": "Использовано", "xloc": [ - "default.handlebars->27->1473", - "default.handlebars->27->1475" + "default.handlebars->27->1482", + "default.handlebars->27->1484" ] }, { @@ -19574,7 +19613,7 @@ "nl": "Gebruikersaccounts", "ru": "Учетные записи пользователей", "xloc": [ - "default.handlebars->27->1492" + "default.handlebars->27->1501" ] }, { @@ -19615,7 +19654,7 @@ "xloc": [ "default.handlebars->27->1146", "default.handlebars->27->1350", - "default.handlebars->27->1465" + "default.handlebars->27->1474" ] }, { @@ -19637,7 +19676,7 @@ "nl": "Gebruikersgroeps lidmaatschap", "ru": "Членство в группах пользователей", "xloc": [ - "default.handlebars->27->1457" + "default.handlebars->27->1466" ] }, { @@ -19719,7 +19758,7 @@ "pt": "Sessões de Usuário", "ru": "Сессии пользователя", "xloc": [ - "default.handlebars->27->1509" + "default.handlebars->27->1518" ] }, { @@ -19847,7 +19886,7 @@ "xloc": [ "default.handlebars->27->1349", "default.handlebars->27->1360", - "default.handlebars->27->1508", + "default.handlebars->27->1517", "default.handlebars->container->topbar->1->1->UsersSubMenuSpan->UsersSubMenu->1->0->UsersGeneral" ] }, @@ -19859,7 +19898,7 @@ "nl": "gebruikers Sessies", "ru": "Сессии пользователей", "xloc": [ - "default.handlebars->27->1496" + "default.handlebars->27->1505" ] }, { @@ -20173,8 +20212,8 @@ "pt": "Servidor web", "ru": "Веб-сервер", "xloc": [ - "default.handlebars->27->1528", - "default.handlebars->27->1529" + "default.handlebars->27->1537", + "default.handlebars->27->1538" ] }, { @@ -20188,7 +20227,7 @@ "pt": "Solicitações de servidor Web", "ru": "Запросы веб-сервера", "xloc": [ - "default.handlebars->27->1530" + "default.handlebars->27->1539" ] }, { @@ -20202,7 +20241,7 @@ "pt": "Encaminhador de soquete da Web", "ru": "Ретранслятор Web Socket", "xloc": [ - "default.handlebars->27->1531" + "default.handlebars->27->1540" ] }, { @@ -20868,7 +20907,7 @@ "pt": "\\\\'", "ru": "\\\\'", "xloc": [ - "default.handlebars->27->1539" + "default.handlebars->27->1548" ] }, { @@ -21059,7 +21098,7 @@ "pt": "livre", "ru": "свободно", "xloc": [ - "default.handlebars->27->1504" + "default.handlebars->27->1513" ] }, { @@ -21293,7 +21332,7 @@ "pt": "servertrace.csv", "ru": "servertrace.csv", "xloc": [ - "default.handlebars->27->1538" + "default.handlebars->27->1547" ] }, { @@ -21330,7 +21369,7 @@ "pt": "tempo, conn.agente, conn.usuários.usersessions, conn.relaysession, conn.intelamt, mem.externo mem.amontoado, mem.heaptotal, mem.rss", "ru": "time, conn.agent, conn.users, conn.usersessions, conn.relaysession, conn.intelamt, mem.external, mem.heapused, mem.heaptotal, mem.rss", "xloc": [ - "default.handlebars->27->1517" + "default.handlebars->27->1526" ] }, { @@ -21342,7 +21381,7 @@ "pt": "hora, fonte, mensagem", "ru": "time, source, message", "xloc": [ - "default.handlebars->27->1537" + "default.handlebars->27->1546" ] }, { @@ -21365,7 +21404,7 @@ "pt": "total", "ru": "всего", "xloc": [ - "default.handlebars->27->1505" + "default.handlebars->27->1514" ] }, { diff --git a/webserver.js b/webserver.js index 46509f41..7531c765 100644 --- a/webserver.js +++ b/webserver.js @@ -3238,9 +3238,6 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { } } else if (req.query.meshaction != null) { if ((domain.loginkey != null) && (domain.loginkey.indexOf(req.query.key) == -1)) { res.sendStatus(404); return; } // Check 3FA URL key - - const domain = checkUserIpAddress(req, res); - if (domain == null) { res.sendStatus(404); return; } var user = obj.users[req.session.userid]; if ((req.query.meshaction == 'route') && (req.query.nodeid != null)) { obj.db.Get(req.query.nodeid, function (err, nodes) { @@ -3267,8 +3264,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { res.set({ 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Content-Type': 'text/plain', 'Content-Disposition': 'attachment; filename="meshaction.txt"' }); res.send(JSON.stringify(meshaction, null, ' ')); }); - } - else if (req.query.meshaction == 'generic') { + } else if (req.query.meshaction == 'generic') { var meshaction = { username: '', password: '',