Skip to content
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

Use JSON.stringify to escape value for mysql when GET assets called with metadata key:value filter #1437

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

cd-rite
Copy link
Collaborator

@cd-rite cd-rite commented Nov 18, 2024

get assets called with a metadata key:value pair with a single backslash in the value is causing mysql to return ER_INVALID_JSON_TEXT_IN_PARAM.

Resolved w/ JSON.stringify and removing outer double quotes from string construction (since stringify adds them).
Resolves: #1436 , originally identified in Watcher repo: NUWCDIVNPT/stigman-watcher#141

…ash in the value is causing mysql to return ER_INVALID_JSON_TEXT_IN_PARAM.

Resolved w/ JSON.stringify and removing outer double quotes from string construction (since stringify adds them).
Copy link

@cd-rite cd-rite merged commit b7d3598 into main Nov 19, 2024
9 of 10 checks passed
@cd-rite cd-rite deleted the 2024-11-18-get-assets-metadata-filter branch November 21, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GET /assets with a metadata filter causing mysql error when value includes single backslash
2 participants