Prevent unauthenticated requests from changing map styles

This commit is contained in:
Sandro Santilli
2012-08-07 17:10:15 +02:00
parent 6a92fd3170
commit 282ac94e29
2 changed files with 33 additions and 9 deletions
+2 -4
View File
@@ -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!"));
}
}