You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While developing a client library for Rust, I've faced a problem.
When a template hash contains a /, there is no way to finalize the template, because Integresql doesn't use URL decoding when reads parameter :hash from an URL
While developing a client library for Rust, I've faced a problem.
When a template hash contains a
/, there is no way to finalize the template, because Integresql doesn't use URL decoding when reads parameter:hashfrom an URLExample
Template initialization
Request:
Response:
{ "database": { "templateHash": "aa/bb", "config": { "host": "postgres", "port": 5432, "username": "user", "password": "password", "database": "integresql_template_aa/bb" } } }Template finalization
Request:
curl --location --request PUT 'http://localhost:5000/api/v1/templates/aa/bb'Response:
{ "message": "Not Found" }Template finalization with
Resquest: ```sh curl --location --request PUT 'http://localhost:5000/api/v1/templates/aa%2Fbb' ```/encoded as%2FResponse:
{ "message": "template not found" }Potential solution 1
Integresql must decode percent-encoded characters from parameters in URLs
Potential solution 2
Integresql must restrict the allowed character set for template hashes to only URL-safe symbols
Temporal solution
Restrict the allowed character set on the client side