Fixed a bug when returning the password reset link, forgot to URL encode the token..

This commit is contained in:
2021-01-08 10:52:10 -06:00
parent d495bfca9c
commit c2297ed368
3 changed files with 22 additions and 1 deletions
+17
View File
@@ -160,6 +160,23 @@ namespace SecureCore.Services
}
}
public static bool IsResetTokenValid(string token)
{
using (var connection = new SqlConnection(ConnectionString))
{
using (var command = new SqlCommand("ValidateResetToken", connection) { CommandType = CommandType.StoredProcedure })
{
command.Parameters.AddWithValue("SessionToken", token);
connection.Open();
var reader = command.ExecuteScalar();
return Convert.ToBoolean(reader);
}
}
}
//public static void ResetPassword(string email)
//{
// using (var connection = new SqlConnection(ConnectionString))