Rename CreateRandomPassword to CreateWeakSecret, to underscore it's nowhere near random

This commit is contained in:
Rick Falkvinge
2016-03-13 11:41:51 +01:00
parent 6f0dca0089
commit 978dfd6fa8
7 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -116,7 +116,7 @@ namespace Swarmops.Logic.Security
}
public static string CreateRandomPassword (int length)
public static string CreateWeakSecret (int length)
{
string allowedChars = "ABCDEFHJKMNPQRTUVWXYZ23456789";
char[] chars = new char[length];
@@ -295,7 +295,7 @@ namespace Swarmops.Logic.Security
return null;
}
string passwordTicket = CreateRandomPassword (EmailVerificationTicketLength);
string passwordTicket = CreateWeakSecret (EmailVerificationTicketLength);
foreach (Person p in candidatePeople)
{
@@ -359,7 +359,7 @@ namespace Swarmops.Logic.Security
public static void RequestMembershipConfirmation (Person p, string URL)
{
string passwordTicket = CreateRandomPassword (EmailVerificationTicketLength);
string passwordTicket = CreateWeakSecret (EmailVerificationTicketLength);
string encodedPasswordTicket = SHA1.Hash (passwordTicket);
p.ResetPasswordTicket = encodedPasswordTicket + ";" + DateTime.Now.ToString ("yyyy-MM-dd HH:mm:ss");