superposition
superposition copied to clipboard
fix: stricter validation for key names in default config
Problem
Currently we allow trailing spaces and special characters in key names which is typically not needed. This PR restricts the characters in the key name to the following regex: ^[a-zA-Z0-9-_.]{1,64}$
Solution
This PR uses the above regex to validate the key in the APIs - if found invalid - return a bad request response
Environment variable changes
NA
Pre-deployment activity
NA
Post-deployment activity
NA
API changes
| Endpoint | Method | Request body | Response Body |
|---|---|---|---|
| API | PUT /config/key | same as existing with additional validations | same as existing |
Possible Issues in the future
NA