Skip to content

Invalid type of parameter in url throws InvalidLinkException #300

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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