Skip to content

API: Slash "/" is not allowed in path parameter when checking permissions #8994

@ErykKul

Description

@ErykKul

What steps does it take to reproduce the issue?
Calling API at "/api/admin/permissions/{dvo}" with global identifier as dvo fails. Slashes are not allowed as path parameters by default and escaping them with %2F does not work.
E.g. http://locahost:8080/api/admin/permissions/doi:10.80442/5CPZVH and http://locahost:8080/api/admin/permissions/doi:10.80442%2F5CPZVH both fail

What happens?
Error: 404 not found.

To whom does it occur (all users, curators, superusers)?
Superusers (only superusers can check permissions with api)

What did you expect to happen?
A valid response with listed permissions for a given object.

Which version of Dataverse are you using?
Develop.

Allowing slashes in dvo path parameter solves the problem
@Path("permissions/{dvo:.+}")
http://locahost:8080/api/admin/permissions/doi:10.80442/5CPZVH works with this setting.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions