[rest] Fix ThingActionsResource does not accept new Thing action UIDs with hash (#4445)

* [rest] Fix ThingActionsResource does not accept new Thing action UIDs due to wrong path RegEx

Signed-off-by: Florian Hotze <dev@florianhotze.com>
This commit is contained in:
Florian Hotze 2024-11-11 09:13:25 +01:00 committed by GitHub
parent 0d031a3b78
commit 31d3434893
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -217,7 +217,9 @@ public class ThingActionsResource implements RESTResource {
@POST
@RolesAllowed({ Role.USER, Role.ADMIN })
@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-Fa-f0-9]+)?}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Operation(operationId = "executeThingAction", summary = "Executes a thing action.", responses = {