Skip to content

Invalid type of parameter in url throws InvalidLinkException #300

@mabar

Description

@mabar

Version: 3.1.5

Bug Description

When child of UI\Presenter expects numeric value in action/render, it may result into InvalidLinkException instead of BadRequestException. It is caused by values like 4'[0] during signals. Without signal or without number-like string, BadRequestException is correctly thrown.

Steps To Reproduce

Define action/render method

public function renderDefault(string $slug, int $page) {/* ... */}

Go to a presenter url which includes valid signal and parameter with value 4'[0]

https://example.com/kategorie/hrani?productId=4721&page=4%27[0]&do=addToWishlist - ❌throws InvalidLinkException
https://example.com/kategorie/hrani?productId=4721&page=4%27[0]&qq=addToWishlist - ✔️throws BadRequestException
https://example.com/kategorie/hrani?productId=4721&page=stringg&do=addToWishlist - ✔️throws BadRequestException

Expected Behavior

Throw BadRequestException

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions