You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HttpRouteParser.TryExtractParameters method in the Microsoft.Extensions.Telemetry library does not handle route parameters that are marked as catch-all. This can lead to either truncated export of the route parameter in structured logging, or misleading redacted data in the output.
Reproduction Steps
Create a route with a catch-all parameter, for example: {*catchall}
Use the HttpRouteParser to parse this route.
Observe the parsing result.
Expected behavior
The HttpRouteParser should correctly handle and parse catch-all route parameters.
Actual behavior
The HttpRouteParser fails to correctly parse routes with catch-all parameters, leading to incorrect logs.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
When redaction is configured, redacted values may be unintuitive because only the first segment of the catch-all route is used.
For example, the following produces the same results since only the segment /1 is taken into account.
redaction: HmacRedactor
route template: path/with/{*catchAll}
requests:
path/with/1/2/3
path/with/1/2
path/with/1
path/with/1/some/data
The text was updated successfully, but these errors were encountered:
Description
The
HttpRouteParser.TryExtractParameters
method in theMicrosoft.Extensions.Telemetry
library does not handle route parameters that are marked as catch-all. This can lead to either truncated export of the route parameter in structured logging, or misleading redacted data in the output.Reproduction Steps
Expected behavior
The
HttpRouteParser
should correctly handle and parse catch-all route parameters.Actual behavior
The
HttpRouteParser
fails to correctly parse routes with catch-all parameters, leading to incorrect logs.Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
When redaction is configured, redacted values may be unintuitive because only the first segment of the catch-all route is used.
For example, the following produces the same results since only the segment
/1
is taken into account.redaction: HmacRedactor
route template:
path/with/{*catchAll}
requests:
path/with/1/2/3
path/with/1/2
path/with/1
path/with/1/some/data
The text was updated successfully, but these errors were encountered: