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

Blazor NavigationManager redirect to NotFound if route parameter contains encoded / #52808

Closed
1 task done
pmpbpl opened this issue Dec 13, 2023 · 7 comments · Fixed by #53470
Closed
1 task done

Blazor NavigationManager redirect to NotFound if route parameter contains encoded / #52808

pmpbpl opened this issue Dec 13, 2023 · 7 comments · Fixed by #53470
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug.
Milestone

Comments

@pmpbpl
Copy link

pmpbpl commented Dec 13, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

NavigationManager redirects to NotFound if route parameter contains encoded '/' instead of requested page.

ex:
/cars/parts%20w%2F%20issue/show

It was working in .net 6. Stops after update to .net8.

Expected Behavior

Navigate to page and bind parameter.

Steps To Reproduce

repo

Exceptions (if any)

No response

.NET Version

.net8.0

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Dec 13, 2023
@javiercn javiercn added the Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue label Dec 14, 2023
@ghost
Copy link

ghost commented Dec 14, 2023

Thank you for filing this issue. In order for us to investigate this issue, please provide a minimal repro project that illustrates the problem without unnecessary code. Please share with us in a public GitHub repo because we cannot open ZIP attachments, and don't include any confidential content.

@ghost ghost added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Dec 14, 2023
@pmpbpl pmpbpl changed the title Blazor NavigationManager redirect to root of page if route parameter contains encoded / Blazor NavigationManager redirect to NotFound if route parameter contains encoded / Dec 14, 2023
@pmpbpl
Copy link
Author

pmpbpl commented Dec 14, 2023

repo

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Dec 14, 2023
@javiercn javiercn removed the Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. label Jan 22, 2024
@javiercn
Copy link
Member

javiercn commented Jan 22, 2024

This is now fixed in main; we'll probably backport it to 8.0 in a future patch release. #53470

@mkArtakMSFT
Copy link
Member

@pmpbpl did you by any chance try the fix out from the nightly build to see if this indeed has addressed the issue you were facing? It most probably did, but would be nice to get confirmation.

@pmpbpl
Copy link
Author

pmpbpl commented Feb 2, 2024

I will happily do, please point me to the instruction how to use the nightly build.

I have been trying :

https://github.com/dotnet/aspnetcore/blob/main/docs/DailyBuilds.md
But with no luck.

@mkArtakMSFT
Copy link
Member

Thanks @pmpbpl. I've already got a confirmation on another thread about the fix, but your scenario may be very slightly different. I've shared the summarized instructions how to try the build here: #53138 (comment)
Those are the steps to use after installing the nightly SDK build.

@pmpbpl
Copy link
Author

pmpbpl commented Feb 5, 2024

Yes, this fix solves navigation issue:)

@mkArtakMSFT mkArtakMSFT added this to the 8.0.3 milestone Feb 9, 2024
@mkArtakMSFT mkArtakMSFT added bug This issue describes a behavior which is not expected - a bug. and removed Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants