Validate uriAbsolute/baseUriAbsolute #11842
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
Milestone
From #11791
Currently,
ComponentHub.StartCircuit
andRemoteUriHelper.NotifyLocationChanged
both just trust the client to supply valid, non-null values foruriAbsolute
/baseUriAbsolute
.Although I don't know specifically how this could be exploited by a bad client, we should at least validate in those two places that the values are non-null and parseable URLs, since there's no reason not to.
For
ComponentHub.StartCircuit
, we could validate thatbaseUriAbsolute
is within the PathBase, and thaturiAbsolute
is withinbaseUriAbsolute
. However I'm not sure that's worth doing because we don't strictly require that as part of the programming model, and we definitely can't enforce it inNotifyLocationChanged
since this is how you navigate to external URLs. So, I'm only proposing we check they are parseable URLs.The text was updated successfully, but these errors were encountered: