Added more validation to the various AuthController functions.
This commit is contained in:
@@ -47,7 +47,6 @@ namespace SecureCore.Authentication
|
||||
public static void InsertPasswordResetRequest(string email, string sessionToken, DateTime expirationDate, string userAgent, string ipAddress, string connectionString)
|
||||
{
|
||||
using var connection = new SqlConnection(connectionString);
|
||||
|
||||
using var command = new SqlCommand("LogPasswordResetRequest", connection) { CommandType = CommandType.StoredProcedure };
|
||||
|
||||
command.Parameters.AddWithValue("SessionToken", sessionToken);
|
||||
@@ -78,7 +77,6 @@ namespace SecureCore.Authentication
|
||||
public static (string PasswordHash, string Salt) GetPasswordHashAndSalt(string username, string connectionString)
|
||||
{
|
||||
using var connection = new SqlConnection(connectionString);
|
||||
|
||||
using var command = new SqlCommand("SELECT [Password Hash], [Salt] FROM dbo.GetUserPasswordHashAndSalt(@Username)", connection);
|
||||
|
||||
command.Parameters.AddWithValue("Username", username);
|
||||
|
||||
Reference in New Issue
Block a user