Skip to content

Verify matching for nested routes #399

Description

@birtona

When calling GET /public/maps/:map_id/layers/:layer_id/places/:id or GET /public/maps/:map_id/layers/:id, only the last param :id is evaluated in the controllers, while the params for :map_id and :layer_id are not read at all, so it might lead to unexpected results, i.e. a layer that does not belong to a map would get delivered to the client when requested by it's :id .
That should be fixed by validating that only the correctly belonging objects are sent, and if the map or layer requested does not exist or not contain the requested layer/place, a forbidden response should be returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions