1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 14:11:59 +01:00

Update index.js

fix for bw
This commit is contained in:
Marek Farkaš
2024-12-08 22:28:46 +01:00
committed by GitHub
parent 3ce2631c1c
commit 81c4494382

View File

@@ -480,7 +480,7 @@ wss.on('connection', (ws, request) => {
// Existing command processing logic
if (((command.startsWith('X') || command.startsWith('Y')) && !request.session.isAdminAuthenticated) ||
((command.startsWith('F') || command.startsWith('W')) && serverConfig.bwSwitch == "false")) {
((command.startsWith('F') || command.startsWith('W')) && serverConfig.bwSwitch === false)) {
logWarn(`User \x1b[90m${clientIp}\x1b[0m attempted to send a potentially dangerous command. You may consider blocking this user.`);
return;
}