diff --git a/login/ChangePW.aspx.vb b/login/ChangePW.aspx.vb index fed4350..2b54fd2 100644 --- a/login/ChangePW.aspx.vb +++ b/login/ChangePW.aspx.vb @@ -24,7 +24,7 @@ Partial Class login_ChangePW Protected Sub btn_submitpw_Click(sender As Object, e As EventArgs) Dim tempstr As String = "" - Dim Msg, Style, Title, Help, Ctxt, MsgResponse, MyString + Dim Msg, Style, Title As String reqPasswtxt.Validate() reqPassw1txt.Validate() If confirmPasswordReq.IsValid = True Then @@ -63,16 +63,12 @@ Partial Class login_ChangePW Protected Sub txt_Pw_TextChanged(sender As Object, e As EventArgs) regexval_txt_Pw.Validate() - If regexval_txt_Pw.IsValid Then txt_Pw_WH.ReadOnly = False regexval_txt_Pw_WH.Enabled = True - - Else txt_Pw_WH.ReadOnly = True regexval_txt_Pw_WH.Enabled = False End If - End Sub End Class diff --git a/login/ForgotPW.aspx.vb b/login/ForgotPW.aspx.vb index 40bb69e..6f538a1 100644 --- a/login/ForgotPW.aspx.vb +++ b/login/ForgotPW.aspx.vb @@ -109,11 +109,23 @@ Partial Class login_ForgotPW Return False End Function - Function genToken() As String + Function genToken(username As String, password As String, email As String) As String Dim time() As Byte = BitConverter.GetBytes(DateTime.UtcNow.ToBinary()) Dim Key() As Byte = Guid.NewGuid().ToByteArray() - Dim token As String = Convert.ToBase64String(time.Concat(Key).ToArray()) - Return token + Try + Dim token As String = Convert.ToBase64String(time.Concat(Key).ToArray()) + Return token + Catch Ex As Exception + Dim Msg, Style, Title As String + Msg = "Tokengenerierung fehlgeschlagen!" & vbCrLf & "Eine E-Mail wurde erneut an " + email + " zugesedet." + Style = vbRetry + vbExclamation + vbDefaultButton1 + Title = "Fehler bei Token-Generierung" + MsgBox(Msg, Style, Title) + + If MsgBox(Msg, Style, Title).Retry Then + SendEmail(username, password, email) + End If + End Try End Function Function getDateoftoken(tokenname As String) As Boolean