12 Commits

Author SHA1 Message Date
Prayag Bhakar 6fb9a35336 fix(rust): enforce lint on all files + fix lint issues (#1394) 2026-08-21 07:38:45 +02:00
Prayag Bhakar e99957bc93 fix(request_body) :: return NULL when the request has no body' (#1392) 2026-08-18 12:39:54 +02:00
lovasoa 1af44a79d0 fmt 2026-04-13 02:44:47 +02:00
lovasoa 85656c4585 chore: migrate to rust 2024 by fixing implicit borrows and unsafe env modifications 2026-04-13 02:03:54 +02:00
Ophir LOJKINE 3eb527490e Fix HTTP status mapping for client request errors (#1240) 2026-03-13 11:11:12 +01:00
Ophir LOJKINE c7e5be793b Return 400 for invalid UTF-8 multipart fields (#1239) 2026-03-12 11:57:29 +01:00
lovasoa 16c089705c Fix: sqlpage.variables() no longer returns duplicate keys
The `sqlpage.variables()` function previously allowed duplicate keys
when GET, POST, and SET variables of the same name were present. This
commit ensures that the returned JSON object contains only unique keys,
with precedence given to SET variables, then POST, then GET.
2025-12-30 03:12:29 +01:00
lovasoa 5688140ca7 add more exhaustive tests for sqlpage.variables
see https://github.com/sqlpage/SQLPage/issues/1169
2025-12-30 02:20:11 +01:00
Ophir LOJKINE 625deb973b Add and document sqlpage.hmac function (#1033)
* feat: Add sqlpage.hmac function for cryptographic signing

Co-authored-by: contact <contact@ophir.dev>

* feat: Add sqlpage.hmac function for secure data signing

Co-authored-by: contact <contact@ophir.dev>

* Test HMAC function with RFC vectors and update tests

Co-authored-by: contact <contact@ophir.dev>

* feat: Add sqlpage.hmac() function for secure signatures

Co-authored-by: contact <contact@ophir.dev>

* feat: Add base64 output option to hmac function

Co-authored-by: contact <contact@ophir.dev>

* Refactor hmac function for cleaner output formatting

Co-authored-by: contact <contact@ophir.dev>

* Add webhook HMAC signature validation tests

Co-authored-by: contact <contact@ophir.dev>

* Refactor HMAC function and update SQL examples for clarity and consistency

- Changed function parameters to remove Option types for data and key in the HMAC function.
- Improved SQL documentation and examples for HMAC usage, including clearer descriptions and updated error handling.
- Enhanced test cases for webhook HMAC validation to ensure accurate signature checks and responses.
- Removed obsolete test file for HMAC with null values.

* Update HMAC validation logic to handle NULL values in SQL queries

- Modified conditions in SQL queries to check for NULL values alongside signature mismatches.
- Enhanced documentation on NULL handling for HMAC checks to improve clarity and portability.

* remove debug logging from ci

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-10-01 21:07:36 +02:00
lovasoa b0dadea0ae feat: add download component
- Introduce a new download component to facilitate file downloads.
- Implement download handling in the header context, supporting data URLs.
- Add a test for the download functionality to ensure correct behavior.

see https://github.com/sqlpage/SQLPage/discussions/996
2025-08-28 22:43:53 +02:00
lovasoa acdc03891d clippy fixes 2025-05-25 23:22:41 +02:00
lovasoa 5cbd12fcfd reorganize tests: better structure 2025-05-25 23:20:31 +02:00