mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improved UTF8 support on the server
This commit is contained in:
parent
3dafa39e79
commit
b41eb7fb55
14 changed files with 41 additions and 111 deletions
|
@ -173,7 +173,7 @@ module.exports.CreateMultiServer = function (parent, args) {
|
|||
function processServerData(msg) {
|
||||
var str = msg.toString('utf8');
|
||||
if (str[0] == '{') {
|
||||
try { command = JSON.parse(str) } catch (e) { obj.parent.parent.debug(1, 'Unable to parse JSON (' + obj.remoteaddr + ').'); return; } // If the command can't be parsed, ignore it.
|
||||
try { command = JSON.parse(str) } catch (e) { obj.parent.parent.debug(1, 'Unable to parse server JSON (' + obj.remoteaddr + ').'); return; } // If the command can't be parsed, ignore it.
|
||||
if (command.action == 'info') {
|
||||
if (obj.authenticated != 3) {
|
||||
// We get the peer's serverid and database identifier.
|
||||
|
@ -337,7 +337,7 @@ module.exports.CreateMultiServer = function (parent, args) {
|
|||
function processServerData(msg) {
|
||||
var str = msg.toString('utf8');
|
||||
if (str[0] == '{') {
|
||||
try { command = JSON.parse(str) } catch (e) { obj.parent.parent.debug(1, 'Unable to parse JSON (' + obj.remoteaddr + ').'); return; } // If the command can't be parsed, ignore it.
|
||||
try { command = JSON.parse(str) } catch (e) { obj.parent.parent.debug(1, 'Unable to parse server JSON (' + obj.remoteaddr + ').'); return; } // If the command can't be parsed, ignore it.
|
||||
if (command.action == 'info') {
|
||||
if (obj.authenticated != 3) {
|
||||
// We get the peer's serverid and database identifier.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue