Skip to content

Commit

Permalink
Fixed xss availability
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Litovchenko committed May 3, 2024
1 parent 46d5f5c commit 009cc9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Controllers/EnvController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace dvcsa.Controllers;

[ApiController]
[Route("/api/.[controller]")]
[Route("/api/.env")]
public class EnvController : ControllerBase
{
[HttpGet(Name = "GetEnv")]
Expand Down
2 changes: 1 addition & 1 deletion Controllers/UsersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ActionResult<string> SearchForUser(string name)
var user = _context.Users.FirstOrDefault(u => u.Name == name);
if (user == null)
{
return NotFound($"User {name} not found");
return Content($"User {name} not found", "text/html");
}
return Ok($"{user.Name} - {user.Password}");
}
Expand Down
8 changes: 4 additions & 4 deletions openapi-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ info:
version: "0.1"
openapi: 3.0.0
paths:
/api/.Env:
/api/.env:
get:
operationId: api_.Env_GET
operationId: api_.env_GET
responses:
default:
description: Default response
x-name: api_.Env_GET
x-name: api_.env_GET
x-source: Controllers/EnvController.cs~~9
x-name: api_.Env
x-name: api_.env
/api/Users:
get:
operationId: api_Users_GET
Expand Down

0 comments on commit 009cc9b

Please sign in to comment.