Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid type of parameter in url throws InvalidLinkException #300

Closed
mabar opened this issue Feb 1, 2022 · 1 comment
Closed

Invalid type of parameter in url throws InvalidLinkException #300

mabar opened this issue Feb 1, 2022 · 1 comment

Comments

@mabar
Copy link
Contributor

mabar commented Feb 1, 2022

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

@mabar
Copy link
Contributor Author

mabar commented Feb 3, 2022

To clarify: it causes error 500 instead of usual 404 which is unpleasant because we can't affect input url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants