Fixed a bug when returning the password reset link, forgot to URL encode the token..
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user