Fix S6931 FN: Route templates starting with ~/
#9002
Labels
Area: C#
C# rules related issues.
Area: VB.NET
VB.NET rules related issues.
Type: False Negative
Rule is NOT triggered when it should be.
Milestone
Route templates starting with
~/
seem to have an equivalent behavior to the ones starting with/
: see here:If so, the following is a False Negative:
since the following is a True Positive:
Alternative: We may also decide to consider
~/
as a more explicit way than/
, for the user to say that the route should actually be attached to the web-application route, and not to the controller one. In that case, we should add~/
as an exception for S6931.Test case: https://sourcegraph.com/github.com/bitwarden/server@b9049cd699e8a80c585346f9c53caa40f38133f2/-/blob/src/Api/Controllers/InfoController.cs
The text was updated successfully, but these errors were encountered: