Skip to content
Snippets Groups Projects
Commit b30895f0 authored by echicken's avatar echicken
Browse files

Filter out non-sysop attempts to write to LEVELS.

parent 113bdbf4
No related branches found
No related tags found
No related merge requests found
......@@ -16,9 +16,17 @@ this.QUERY = function(client, packet) {
var location = packet.location.split(".");
// It's okay for clients to write to *.LATEST
if(packet.oper == "WRITE" && location.length == 2 && location[1] == "LATEST")
// It's okay for clients to write to *.LATEST (except LEVELS)
if( packet.oper == "WRITE"
&&
location.length == 2
&&
location[0] != "LEVELS"
&&
location[1] == "LATEST"
) {
return false; // Command not handled (the JSON service can continue processing this command)
}
/* Only sysops can use unapproved commands everywhere else.
service.js identifies as the host BBS' sysop. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment