Änderungen
This commit is contained in:
@@ -778,24 +778,8 @@ Partial Class ForgotPW
|
|||||||
Dim salt As String = VERAG_VARIABLES.GenerateSalt(My1stRandomNumber)
|
Dim salt As String = VERAG_VARIABLES.GenerateSalt(My1stRandomNumber)
|
||||||
Dim tok As String = Convert.ToBase64String(time.Concat(Key).ToArray())
|
Dim tok As String = Convert.ToBase64String(time.Concat(Key).ToArray())
|
||||||
token = VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(VERAG_VARIABLES.HashPassword(tok, salt, 1991, My2ndRandomNumber))
|
token = VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(VERAG_VARIABLES.HashPassword(tok, salt, 1991, My2ndRandomNumber))
|
||||||
|
Return token
|
||||||
|
|
||||||
If SendEmail(username, password, email, token, CustomerID, isusrnmright, iscstmIDright, isemailright, Session.IsNewSession, theUserID) = True Then
|
|
||||||
'MsgBox("Email could not been sent because of an internal encryption error.", vbOK + vbInformation + vbDefaultButton1, "Token-Generation Error")
|
|
||||||
Else
|
|
||||||
'MsgBox("Email has been sent successful." & vbCr & "Please check your E-Mails!", vbOK + vbInformation + vbDefaultButton1, "Token-Generation successful!")
|
|
||||||
End If
|
|
||||||
'Else
|
|
||||||
'MsgBox("Token-Generation has not been successful." & vbCrLf & "Please try again in five seconds!")
|
|
||||||
Dim jetzt As DateTime = DateTime.UtcNow
|
|
||||||
Dim wenn As DateTime = DateTime.UtcNow.AddSeconds(-5)
|
|
||||||
|
|
||||||
If jetzt < wenn Then
|
|
||||||
Return "NotYet"
|
|
||||||
Else
|
|
||||||
token = gensaltToken(username, password, email, CustomerID, isusrnmright, iscstmIDright, isemailright, Session.IsNewSession, theUserID)
|
|
||||||
Return token
|
|
||||||
'End If
|
|
||||||
End If
|
|
||||||
End Try
|
End Try
|
||||||
Else
|
Else
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
@@ -856,7 +840,6 @@ Partial Class ForgotPW
|
|||||||
'Return sb.ToString()
|
'Return sb.ToString()
|
||||||
'End Function
|
'End Function
|
||||||
|
|
||||||
|
|
||||||
Protected Sub btn_Testmail_Click(sender As Object, e As EventArgs)
|
Protected Sub btn_Testmail_Click(sender As Object, e As EventArgs)
|
||||||
Dim username As String = "userwithlongername"
|
Dim username As String = "userwithlongername"
|
||||||
Dim Passw As String = "Test1!W"
|
Dim Passw As String = "Test1!W"
|
||||||
@@ -864,7 +847,8 @@ Partial Class ForgotPW
|
|||||||
Dim CustomerID As String = "717585"
|
Dim CustomerID As String = "717585"
|
||||||
Dim TheusrID As String = "3"
|
Dim TheusrID As String = "3"
|
||||||
Dim tokentest As String = genToken(username, Passw, email, CustomerID, True, True, True, False, TheusrID)
|
Dim tokentest As String = genToken(username, Passw, email, CustomerID, True, True, True, False, TheusrID)
|
||||||
Dim salttoken As String = gensaltToken(username, Passw, email, CustomerID, True, True, True, False, TheusrID)
|
'Dim salttoken As String = gensaltToken(username, Passw, email, CustomerID, True, True, True, False, TheusrID)
|
||||||
|
MsgBox(salttoken)
|
||||||
If Session.Item("TokenforEmail") = Nothing Then
|
If Session.Item("TokenforEmail") = Nothing Then
|
||||||
tokentest = genToken(username, Passw, email, CustomerID, True, True, True, False, TheusrID)
|
tokentest = genToken(username, Passw, email, CustomerID, True, True, True, False, TheusrID)
|
||||||
Session.Add("TokenforEmail", tokentest)
|
Session.Add("TokenforEmail", tokentest)
|
||||||
@@ -875,7 +859,7 @@ Partial Class ForgotPW
|
|||||||
|
|
||||||
If SendEmail(username, Passw, email, tokentest, CustomerID, True, True, True, False, TheusrID) = True Then
|
If SendEmail(username, Passw, email, tokentest, CustomerID, True, True, True, False, TheusrID) = True Then
|
||||||
'password = RandomString(New Random, 10)
|
'password = RandomString(New Random, 10)
|
||||||
If (getDateoftoken(tokentest) = True) Then
|
If getDateoftoken(tokentest) = True Then
|
||||||
'Dim msgboxstyle = vbDefaultButton1 + vbOK
|
'Dim msgboxstyle = vbDefaultButton1 + vbOK
|
||||||
'MsgBox(tokenname, msgboxstyle)
|
'MsgBox(tokenname, msgboxstyle)
|
||||||
lblMessage_M.ForeColor = Color.Green
|
lblMessage_M.ForeColor = Color.Green
|
||||||
|
|||||||
Reference in New Issue
Block a user