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

Fix issue related to invalid characters in tags being submitted. #1322

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

friedkiwi
Copy link
Contributor

The default behaviour of SteVe is to create a new OCPP tag if the charging point submits an unknown tag. If this tag contains invalid characters, the entry ends up in an invalid state:

  • you cannot see it in the OCPP tag overview page (and also isn't displayed in the unknown tag section)
  • if you go to the active/past sessions pane, and click through to the tag over there, you cannot edit or delete the tag since it doesn't pass validation.

This bug gets triggered because some charge points send arbitrary text as a tag when FreeCharge mode is enabled. The Webasto Next (https://charging.webasto.com/int/products/webasto-next/) chargepoint I use triggers this bug, since it uses the #FreeCharging tag ID when freecharging is enabled.

This PR adds the '#' sign to the whitelist of characters allowed, fixing this issue.

The default behaviour of SteVe is to create a new OCPP tag if the charging point submits an unknown tag. If this tag contains invalid characters, the entry ends up in an invalid state:

- you cannot see it in the OCPP tag overview page (and also isn't displayed in the unknown tag section)
- if you go to the active/past sessions pane, and click through to the tag over there, you cannot edit or delete the tag since it doesn't pass validation.

This bug gets triggered because some charge points send arbitrary text as a tag when FreeCharge mode is enabled. The Webasto Next [1] chargepoint I use triggers this bug, since it uses the #FreeCharging tag ID when freecharging is enabled.

This PR adds the '#' sign to the whitelist of characters allowed, fixing this issue.

[1]: https://charging.webasto.com/int/products/webasto-next/
@goekay
Copy link
Member

goekay commented Dec 11, 2023

thank you @friedkiwi !

@goekay
Copy link
Member

goekay commented Dec 11, 2023

@friedkiwi could you pls add a test case in IdTagValidatorTest that addresses this exact use case?

@friedkiwi
Copy link
Contributor Author

@friedkiwi could you pls add a test case in IdTagValidatorTest that addresses this exact use case?

Done.

@goekay
Copy link
Member

goekay commented Dec 15, 2023

thank you!

@goekay goekay merged commit 6b5bdd0 into steve-community:master Dec 15, 2023
27 checks passed
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.

2 participants