api: clean url upon entry, not down the road
This commit is contained in:
@@ -97,7 +97,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
|
||||
let chck = checkJSONPost(request);
|
||||
if (!chck) throw new Error();
|
||||
|
||||
j = await getJSON(chck["url"], lang, chck);
|
||||
j = await getJSON(chck.url, lang, chck);
|
||||
} else {
|
||||
j = apiJSON(0, {
|
||||
t: !contentCon ? "invalid content type header" : loc(lang, 'ErrorNoLink')
|
||||
|
||||
Reference in New Issue
Block a user