fix: add missing return in protected note create handler (#46)
All checks were successful
/ pre-commit (push) Successful in 2m4s

Reviewed-on: #46
Reviewed-by: Julien Riou <jriou@monitoring@riou.xyz>
Co-authored-by: Thibault Piron <thibault.piron.ext@ovhcloud.com>
Co-committed-by: Thibault Piron <thibault.piron.ext@ovhcloud.com>
This commit is contained in:
Thibault Piron 2025-10-13 17:37:20 +02:00 committed by Julien Riou
commit 020b50fb58

View file

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