-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
[rest] Fix ThingActionsResource does not accept new Thing action UIDs with hash #4445
Conversation
… due to wrong path RegEx Signed-off-by: Florian Hotze <[email protected]>
Probably correct |
@Path("/{thingUID}/{actionUid: [a-zA-Z0-9]+\\.[a-zA-Z0-9]+}") | ||
// accept actionUid in the form of "scope.actionTypeUid" or "scope.actionTypeUid#signatureHash" | ||
// # is URL encoded as %23 | ||
@Path("/{thingUID}/{actionUid: [a-zA-Z0-9]+\\.[a-zA-Z0-9]+(%23[a-zA-Z0-9]+)?}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hash is a hex string, correct? In that case A-Fa-f0-9
would be sufficient. Since we do a lookup on the hash and that is case-sensitive it Coups be a good idea to also restrict that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, just implemented and pushed that.
Local test looks good.
Signed-off-by: Florian Hotze <[email protected]>
Can someone please trigger a new snapshot build? |
It's already done: https://ci.openhab.org/job/openHAB-Core/58/changes (for core that is - not yet the distro). |
Now there's also a new distro for testing: https://ci.openhab.org/job/openHAB-Distribution/4374/ |
Regression from #4441.