From 63445461578117308000c29e59fabd17ab37d636 Mon Sep 17 00:00:00 2001 From: Kham Date: Mon, 10 Nov 2025 13:28:42 +1100 Subject: [PATCH] allow to get report. security problem on controller --- Controllers/UsersController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Controllers/UsersController.cs b/Controllers/UsersController.cs index bcee018..6d7dae1 100644 --- a/Controllers/UsersController.cs +++ b/Controllers/UsersController.cs @@ -67,7 +67,7 @@ namespace CarParkValidationAPI.Controllers var users = await _userService.GetAllUsers(); return Ok(users); } - + [AllowAnonymous] [HttpGet("{id:int}")] public async Task GetById(int id) { @@ -80,6 +80,7 @@ namespace CarParkValidationAPI.Controllers return Ok(user); } /* download the excel file */ + [AllowAnonymous] [HttpGet("[action]")] public async Task GetReportFile() {