Commit graph

14 commits

Author SHA1 Message Date
41591cd2f4
fix: add missing return in protected note create handler 2025-10-13 15:29:15 +00:00
b316c6ef67
feat: Add copier and curl links
All checks were successful
/ pre-commit (push) Successful in 1m16s
Signed-off-by: Julien Riou <julien@riou.xyz>
2025-10-02 09:23:40 +02:00
acfad88cb8
feat: Handle X-Forwarded-Proto header
All checks were successful
/ pre-commit (push) Successful in 1m40s
Fixes #39.

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-10-02 07:27:43 +02:00
de24146991
feat: Encode password
All checks were successful
/ pre-commit (push) Successful in 1m14s
Fixes #38.

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-10-02 07:07:10 +02:00
f721e56371
refactor: Use functional errors
All checks were successful
/ pre-commit (push) Successful in 1m25s
Use well-defined server errors instead of hardcoded messages that could be
slightly different and spread accross the code base.

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-10-02 06:35:27 +02:00
55de3afc71
feat: Return top-level errors to clients
All checks were successful
/ pre-commit (push) Successful in 1m13s
In order to reduce security risk, the server now returns only functional error
messages to the clients and log low-level error messages.

Fixes #35.

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-10-01 18:13:15 +02:00
ee7b5f0c6e
feat: Pass encryption key in URL fragment
All checks were successful
/ pre-commit (push) Successful in 1m21s
- Remove encryptionKey from URL
- Use POST method to pass both password and encryption key
- Parse URL fragment to extract the encryption key from the web (using
  javascript) and from the CLI

Fixes #36.

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-10-01 12:43:04 +02:00
1fcde736a8
fix: convert id to int64
All checks were successful
/ pre-commit (push) Successful in 1m33s
Snowflake identifiers are integers, not strings.

BREAKING CHANGE: notes that are not using snowflake identifiers will not be
compatible anymore.

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-09-27 10:05:58 +02:00
b5701b5a4d
feat: replace Monaco by Ace
All checks were successful
/ pre-commit (push) Successful in 1m20s
- Remove the Monaco Editor because it was to heavy and hard to integrate
- Use Ace instead
- Use the lowercase identifier for languages (ex: "Text" -> "text")
- Select automatically the default language in the drop down to create a note
  (like the expiration)
- Add `ace_directory` to serve assets from a local folder instead of a CDN
- "hcl" syntax highlighting has been removed
- "go" syntax highlighting has been renamed to "golang"
- Add option to disable the editor

Fixes #32.

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-09-27 09:56:50 +02:00
9e0254c0b5
feat: Add password protection
All checks were successful
/ pre-commit (push) Successful in 1m20s
Fixes #37.

BREAKING CHANGE: API routes are prefixed by /api/note.

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-09-27 08:36:00 +02:00
61ca30690b
feat: Disable levels of encryptions by default
All checks were successful
/ pre-commit (push) Successful in 1m11s
- Add `allow_client_encryption_key` option to allow encryption key provided by
  the client on the web UI (false by default)
- Add `allow_no_encryption` option to allow notes without encryption (disabled
  by default)

Signed-off-by: Julien Riou <julien@riou.xyz>
2025-09-24 17:44:50 +02:00
75bdab55df
refactor: Rename protected to encrypted
All checks were successful
/ pre-commit (push) Successful in 1m4s
Signed-off-by: Julien Riou <julien@riou.xyz>
2025-09-24 09:50:13 +02:00
8e1dd686d3
feat: Rename password by encryption key
All checks were successful
/ pre-commit (push) Successful in 1m9s
Signed-off-by: Julien Riou <julien@riou.xyz>
2025-09-24 07:09:01 +02:00
3a7d82a396
refactor: Move handlers into their own files
All checks were successful
/ pre-commit (push) Successful in 1m10s
Signed-off-by: Julien Riou <julien@riou.xyz>
2025-09-20 06:47:31 +02:00