We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67342cd commit b37a7b9Copy full SHA for b37a7b9
1 file changed
src/ModelContextProtocol.AspNetCore/Auth/McpAuthenticationHandler.cs
@@ -130,7 +130,7 @@ protected override Task HandleChallengeAsync(AuthenticationProperties properties
130
131
// Set the WWW-Authenticate header with the resource_metadata
132
string headerValue = $"Bearer realm=\"{Scheme.Name}\"";
133
- headerValue += $", resource_metadata=\"{rawPrmDocumentUri}\"";
+ headerValue += $", resource_metadata=\"{Uri.EscapeDataString(rawPrmDocumentUri)}\"";
134
135
Response.Headers["WWW-Authenticate"] = headerValue;
136
0 commit comments