Skip to content

Commit

Permalink
:fix: scopeid representation can contain dashes, which need to be cap…
Browse files Browse the repository at this point in the history
…tured by the bypass regex for legacy endpoints

Signed-off-by: dseurotech <davide.salvador@eurotech.com>
  • Loading branch information
dseurotech committed Jun 20, 2024
1 parent 9ab98f4 commit 8b57465
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
Where the scopeId has no meaning when dealing with a specific account
Remove the match with /{scopeId}/... in the next release
*/
@Path("{scopeId: (\\w+)?}{path:|/}accounts/{accountId}")
@Path("{scopeId: ([\\w-]+)?}{path:|/}accounts/{accountId}")
public class Account extends AbstractKapuaResource {

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
Where the scopeId has no meaning of the current user (the one from the session will always be used)
Remove the match with /{scopeId}/... in the next release
*/
@Path("{scopeId: (\\w+)?}{path:|/}user/credentials")
@Path("{scopeId: ([\\w-]+)?}{path:|/}user/credentials")
public class UserCredentials extends AbstractKapuaResource {

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Where the scopeId has no meaning of the current user (the one from the session will always be used)
Remove the match with /{scopeId}/... in the next release
*/
@Path("{scopeId: (\\w+)?}{path:|/}user/profile")
@Path("{scopeId: ([\\w-]+)?}{path:|/}user/profile")
public class UserProfiles extends AbstractKapuaResource {

@Inject
Expand Down

0 comments on commit 8b57465

Please sign in to comment.