mirror of https://github.com/status-im/codimd.git
return errorForbidden when anonymous user tries to create freeUrl pad (closes #1499)
Signed-off-by: Lucas Druschke <ldruschk@posteo.de>
This commit is contained in:
parent
4fd6293963
commit
bcd92f500f
|
@ -61,6 +61,8 @@ async function showNote (req, res) {
|
|||
// if allow free url enable, auto create note
|
||||
if (!config.allowFreeURL || config.forbiddenNoteIDs.includes(noteId)) {
|
||||
return errorNotFound(req, res)
|
||||
} else if (!config.allowAnonymous && !userId) {
|
||||
return errorForbidden(req, res)
|
||||
}
|
||||
note = await createNote(userId, noteId)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue