diff --git a/login/ForgotPW.aspx b/login/ForgotPW.aspx index 3a2b386..1e118ff 100644 --- a/login/ForgotPW.aspx +++ b/login/ForgotPW.aspx @@ -72,19 +72,19 @@
- + + -->
- +

Passwort vergessen:

diff --git a/login/ForgotPW.aspx.vb b/login/ForgotPW.aspx.vb index 3b7b7ad..6505523 100644 --- a/login/ForgotPW.aspx.vb +++ b/login/ForgotPW.aspx.vb @@ -106,7 +106,23 @@ Partial Class login_ForgotPW Return False End Function + Function genToken() 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 + End Function + Function getDateoftoken(tokenname As String) As Boolean + Dim data() As Byte = Convert.FromBase64String(tokenname) + Dim wenn As DateTime = DateTime.FromBinary(BitConverter.ToInt64(data, 0)) + If wenn < DateTime.UtcNow.AddHours(-24) Then + Return False + MsgBox("Token nicht gefunden oder zu alt!" + Environment.NewLine + "Bitte erneut Mail senden!") + Else + Return True + End If + End Function Protected Sub txtEmail_TextChanged(sender As Object, e As EventArgs) regexval_txt_Email.Validate()