mirror of https://github.com/status-im/codimd.git
Merge pull request #1500 from ldruschk/fix-internal-server-error-freeurl-not-logged-in
return errorForbidden when anonymous user tries to create freeUrl pad
This commit is contained in:
commit
a6c7582aa2
|
@ -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