Prevent unauthenticated requests from changing map styles
This commit is contained in:
@@ -37,8 +37,7 @@ var CartodbWindshaft = function(serverOptions) {
|
||||
else that.afterStateChange(req, data, callback);
|
||||
});
|
||||
} else {
|
||||
console.log("WARNING: map style changed by unauthenticated request!");
|
||||
this.afterStateChange(req, data, callback);
|
||||
callback(new Error("map style cannot be changed by unauthenticated request!"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,8 +52,7 @@ var CartodbWindshaft = function(serverOptions) {
|
||||
else that.afterStateChange(req, data, callback);
|
||||
});
|
||||
} else {
|
||||
console.log("WARNING: map style deleted by unauthenticated request!");
|
||||
this.afterStateChange(req, data, callback);
|
||||
callback(new Error("map style cannot be deleted by unauthenticated request!"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user