From 154e8868736fe52d8e1950cb6de8e37eb9aae293 Mon Sep 17 00:00:00 2001 From: idotobi <16611056+idotobi@users.noreply.github.com> Date: Mon, 20 Apr 2020 14:07:06 +0200 Subject: [PATCH] Fix Comment in Webserver API route tidlers.json (#4557) This commit fixes the the comment in the route `recipes/default/tiddlers.json` which was inconsistent with the actually used regex. Furthermore, the 403 response was adjusted to also agree with the the new comment and the regex. Co-authored-by: tobidot --- core/modules/server/routes/get-tiddlers-json.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/server/routes/get-tiddlers-json.js b/core/modules/server/routes/get-tiddlers-json.js index 8e93733e4..80c2a9cf9 100644 --- a/core/modules/server/routes/get-tiddlers-json.js +++ b/core/modules/server/routes/get-tiddlers-json.js @@ -3,7 +3,7 @@ title: $:/core/modules/server/routes/get-tiddlers-json.js type: application/javascript module-type: route -GET /recipes/default/tiddlers/tiddlers.json?filter= +GET /recipes/default/tiddlers.json?filter= \*/ (function() { @@ -22,7 +22,7 @@ exports.handler = function(request,response,state) { var filter = state.queryParameters.filter || DEFAULT_FILTER; if($tw.wiki.getTiddlerText("$:/config/Server/AllowAllExternalFilters") !== "yes") { if($tw.wiki.getTiddlerText("$:/config/Server/ExternalFilters/" + filter) !== "yes") { - console.log("Blocked attempt to GET /recipes/default/tiddlers/tiddlers.json with filter: " + filter); + console.log("Blocked attempt to GET /recipes/default/tiddlers.json with filter: " + filter); response.writeHead(403); response.end(); return;