fix: add missing return in protected note create handler #46

Merged
jriou merged 1 commit from tapiron/coller:fix/missing_returns_in_handler into main 2025-10-13 17:37:20 +02:00
Showing only changes of commit 41591cd2f4 - Show all commits

fix: add missing return in protected note create handler

Thibault Piron 2025-10-13 15:27:50 +00:00
Signed by: tapiron
GPG key ID: AD0AE183112CCC00

View file

@ -147,10 +147,12 @@ func (h *CreateNoteWithFormHandler) ServeHTTP(w http.ResponseWriter, r *http.Req
if !h.PageData.AllowNoEncryption && noEncryption != "" {
h.WebError(w, logger, ErrEncryptionRequired, nil)
return
}
if !h.PageData.AllowClientEncryptionKey && encryptionKey != "" {
h.WebError(w, logger, ErrClientEncryptionKeyNotAllowed, nil)
return
}
if !h.PageData.AllowClientEncryptionKey && encryptionKey == "" && noEncryption == "" {