On Mac OS, when localhost:8080 is defined and sqlpage config file, the SocketAddr is resolved with ipv6 address if ip V6 is available on the internal network.
```json
{
"listen_on": "localhost:8080"
}
```
On the terminal we can Ctrl + Click, but the URL is incorrect (ipV6 notation use bracket)
Actually we have
```shell
View your website at:
🔗http://::1:8080
```
Instead of
```
View your website at:
🔗http://[::1]:8080
```
Regards,
- Changed debug logs to warning logs for invalid icon names and missing icons in the IconImgHelper.
- Updated the way icons are retrieved from the ICON_MAP for better clarity and performance.
- Recorded server timing for the parameter binding process in the query execution flow.
- Updated tests to verify the inclusion of the new timing event in the server timing header.
- Updated response handling to use a builder pattern for better clarity and consistency.
- Enhanced server timing format to include microseconds in the output.
- Added a new test for server timing in redirect responses to ensure proper header inclusion.
This commit modifies the ServerTiming structure to utilize Arc for thread-safe reference counting, enhancing performance and memory management. The header generation logic is streamlined, and related code is updated to reflect these changes. Additionally, tests are adjusted to ensure proper functionality with the new implementation.
Co-authored-by: contact <contact@ophir.dev>
This commit refactors the Server-Timing header generation to be more efficient and adds comprehensive tests for its behavior in development and production environments. It also includes a new test SQL file for server timing verification.
Co-authored-by: contact <contact@ophir.dev>
- Updated routing logic to execute SQL files when a request is made for paths with extensions other than .sql.
- Added tests to verify that SQL files are executed correctly for paths with non-SQL extensions.
- Updated CHANGELOG to reflect this new feature in version 0.38.1.
- Enabled arbitrary precision for `serde_json` to handle large numbers without rounding.
- Refactored decimal handling in `sql_to_json.rs` to utilize a new function for converting decimals to JSON format.
Fixes https://github.com/sqlpage/SQLPage/issues/1052
`SET x = 'hello'` is now executed locally by SQLPage and does not send anything to the database. This completely removes the cost of extracting static values into variables for cleaner SQL files.
- Updated column name handling in `row_to_json` to use lowercase for ODBC databases.
- Added `canonical_col_name` function to standardize column names.
- Modified SQL queries in tests to use lowercase column names for consistency.
- Enhanced tests for edge cases and variations in column naming.
* 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>
- Introduced Snowflake as a supported database in the enum and related logic.
- Updated SQL table creation to include Snowflake-specific syntax.
- Enhanced logging for file modification checks in both local and database contexts.
This commit introduces support for ODBC databases, allowing users to connect to a wider range of data sources. It also includes updates to various dependencies, ensuring the project is using the latest stable versions and incorporating necessary bug fixes and performance improvements.
Co-authored-by: contact <contact@ophir.dev>
* Refactor OIDC request handling to streamline callback processing and remove redundant code. Simplify the handling of authenticated user info and improve error logging for OIDC callback parameters.
* Refactor OIDC callback processing to use ID token directly, enhancing cookie management and nonce handling. Update logging for successful logins and streamline token claims retrieval.
* Refactor OIDC state management to use a temporary login flow state cookie, enhancing nonce and redirect handling. Update cookie creation and retrieval methods for improved clarity and maintainability.
fixes https://github.com/sqlpage/SQLPage/issues/1014
* Enhance error handling in login flow state parsing by adding context to JSON deserialization failure.
* Fix infinite redirect loop in OIDC login flows when multiple tabs initiate login simultaneously, particularly after inactivity in mobile browsers.
* clippy
* Refactor OIDC state handling to use separate nonce and redirect cookies
Co-authored-by: contact <contact@ophir.dev>
* Refactor OIDC state management to use separate nonce and redirect cookies
Co-authored-by: contact <contact@ophir.dev>
* Refactor OIDC redirect handling to use updated cookie names and improve error logging
* Update OIDC redirect response to use header constant and simplify cookie creation
* Refactor nonce retrieval in OIDC user info handling to simplify logic and ensure proper token claims processing
* Refactor OIDC cookie handling to introduce a constant for cookie expiration and simplify nonce validation logic
* Refactor OIDC redirect URL cookie retrieval to streamline logic and improve error handling
* Refactor OIDC redirect URL cookie name construction for improved clarity
* fix redirect auth cookie removal
Update OIDC redirect URL cookie path to ensure proper handling after authentication
* Refactor OIDC redirect URL cookie name construction for improved efficiency
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>