feat: Encode password
All checks were successful
/ pre-commit (push) Successful in 1m14s

Fixes #38.

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2025-10-02 07:06:54 +02:00
commit de24146991
Signed by: jriou
GPG key ID: 9A099EDA51316854
7 changed files with 42 additions and 20 deletions

View file

@ -170,7 +170,7 @@ func (h *CreateNoteWithFormHandler) ServeHTTP(w http.ResponseWriter, r *http.Req
}
logger.Debug("saving note to the database")
note, err := h.db.Create(content, password, encryptionKey, encryptionKey != "", expirationInt, deleteAfterRead != "", language)
note, err := h.db.Create(content, []byte(password), encryptionKey, encryptionKey != "", expirationInt, deleteAfterRead != "", language)
if err != nil {
h.WebError(w, logger, ErrCouldNotCreateNote, err)
return