-
-
Notifications
You must be signed in to change notification settings - Fork 154
Add and document sqlpage.hmac function #1033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add and document sqlpage.hmac function #1033
Conversation
Co-authored-by: contact <[email protected]>
Cursor Agent can help with this pull request. Just |
Co-authored-by: contact <[email protected]>
@cursoragent the tests (both rust and sql) should check the actual hmac hashes are correct |
I significantly improved the
Learn more about Cursor Agents |
Co-authored-by: contact <[email protected]>
@cursoragent make the documentation of the new function more readable by less-technical users and beginner developers. For the example, show how to validate hmac signatures from shopify: https://shopify.dev/docs/apps/build/webhooks/subscribe/https . The example should be tested in one of the it_works*.sql tests The changelog.md should be updated too |
I implemented a new
Learn more about Cursor Agents |
Co-authored-by: contact <[email protected]>
@cursoragent Do not use the text component do display an error message in examples or in tests ! Use the redirect component to redirect to an error page when the hash does not match. The algorithm parameter should also let the user specify the desired output format: hex or base64 |
I enhanced the
Learn more about Cursor Agents |
Co-authored-by: contact <[email protected]>
@cursoragent cargo clippy, fmt and test |
I refactored the
Learn more about Cursor Agents |
Co-authored-by: contact <[email protected]>
@cursoragent add a test sql file (not an it_works* file) with your example code that checks an hmac body signature, and a .rs file in tests that calls the file, first with an invalid signature in the headers, then with a valid one. |
I implemented comprehensive testing for webhook HMAC signature validation, covering scenarios for valid, invalid, and missing signatures. This ensures the
Learn more about Cursor Agents |
Co-authored-by: contact <[email protected]>
…tency - 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.
- 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.
Add
sqlpage.hmac
function to provide cryptographic HMAC capabilities for secure authentication and data integrity, with comprehensive documentation.