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

BUG: configs.js: prevent frontend from converting numeric strings to numbers #301

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

monoidic
Copy link
Collaborator

@monoidic monoidic commented Jul 1, 2024

intelmq-manager allows the user to fill in a configuration value with a numeric string by enclosing it in quotes, such as "200", and it is submitted correctly. When editing the configuration of the same bot later, the values, including the numeric string, are filled in with the current configuration values. However, this filled in value will not contain the quotes and will subsequently be considered a number. This can cause type errors if a string is expected for this value.

This patch detects numeric strings and adds quotation marks for them ahead of time when editing the configuration in intelmq-manager, preventing "200" from being silently converted to 200 on subsequent edits.

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.

1 participant