8000 generate bad request on password reset with missing email address · devel0/example-webapp-with-auth@cf4ca8a · GitHub
[go: up one dir, main page]

Skip to content

Commit cf4ca8a

Browse files
committed
generate bad request on password reset with missing email address
1 parent 43580e3 commit cf4ca8a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/backend/Controllers/AuthController.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,11 @@ public async Task<ActionResult<EditUserResponseDto>> EditUser(EditUserRequestDto
217217
/// </summary>
218218
[HttpGet]
219219
[AllowAnonymous]
220-
public async Task<ActionResult> ResetLostPassword(string email 67A8 , string? token, string? resetPassword)
220+
public async Task<ActionResult> ResetLostPassword(string? email, string? token, string? resetPassword)
221221
{
222+
if (email is null)
223+
throw new BadHttpRequestException("Email address required.");
224+
222225
var res = await authService.ResetLostPasswordRequestAsync(
223226
email,
224227
token,

0 commit comments

Comments
 (0)
0