1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-02-26 15:52:42 +00:00

Fixed: Can't login with a username and a blank password

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick 2019-03-26 22:12:44 -04:00
parent 4545e679af
commit 7fd0089884

View file

@ -1,4 +1,4 @@
using System; using System;
using Nancy; using Nancy;
using Nancy.Authentication.Forms; using Nancy.Authentication.Forms;
using Nancy.Extensions; using Nancy.Extensions;
@ -26,8 +26,7 @@ private Response Login(LoginResource resource)
{ {
Ensure.That(resource.Username, () => resource.Username).IsNotNullOrWhiteSpace(); Ensure.That(resource.Username, () => resource.Username).IsNotNullOrWhiteSpace();
// TODO: A null or empty password should not be allowed, uncomment in v3 Ensure.That(resource.Password, () => resource.Password).IsNotNullOrWhiteSpace();
//Ensure.That(resource.Password, () => resource.Password).IsNotNullOrWhiteSpace();
var user = _userService.FindUser(resource.Username, resource.Password); var user = _userService.FindUser(resource.Username, resource.Password);