From e24cb9888c978776399fb20bd1921b2406e08350 Mon Sep 17 00:00:00 2001 From: ja Date: Fri, 8 Oct 2021 16:20:15 +0200 Subject: [PATCH] =?UTF-8?q?=C3=84nderungen=20Design?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- login/ChangePW.aspx | 4 +- login/ChangePW.aspx.vb | 9 +-- login/ForgotPW.aspx | 4 +- login/ForgotPW.aspx.vb | 18 ++--- login/login_FLEX.aspx | 140 +++++++++++++++++++-------------------- login/login_FLEX.aspx.vb | 5 +- 6 files changed, 82 insertions(+), 98 deletions(-) diff --git a/login/ChangePW.aspx b/login/ChangePW.aspx index 4f11c4f..83b57d5 100644 --- a/login/ChangePW.aspx +++ b/login/ChangePW.aspx @@ -119,9 +119,7 @@ - - - + diff --git a/login/ChangePW.aspx.vb b/login/ChangePW.aspx.vb index 01aa1c3..95560ad 100644 --- a/login/ChangePW.aspx.vb +++ b/login/ChangePW.aspx.vb @@ -90,20 +90,15 @@ Partial Class login_ChangePW Function getDateoftoken(tokenname As String) As Boolean Dim data() As Byte = Convert.FromBase64String(tokenname) Dim wenn As DateTime = DateTime.FromBinary(BitConverter.ToInt64(data, 0)) - tmr_PWToken.Interval = 30000 - tmr_PWToken.Enabled = True If wenn < DateTime.UtcNow.AddMinutes(-3) Then Return False + tokenname = "" MsgBox("Token nicht gefunden oder zu alt!" + Environment.NewLine + "Bitte erneut Mail senden!") Else - tmr_PWToken.Enabled = False + Return True End If End Function - - Protected Sub tmr_PWToken_Tick(sender As Object, e As EventArgs) - btn_submitpw.Enabled = False - End Sub End Class diff --git a/login/ForgotPW.aspx b/login/ForgotPW.aspx index a77c6d1..03c5043 100644 --- a/login/ForgotPW.aspx +++ b/login/ForgotPW.aspx @@ -118,9 +118,7 @@ - - - + diff --git a/login/ForgotPW.aspx.vb b/login/ForgotPW.aspx.vb index cae56af..a57c88c 100644 --- a/login/ForgotPW.aspx.vb +++ b/login/ForgotPW.aspx.vb @@ -7,9 +7,6 @@ Imports System.Data Partial Class login_ForgotPW Inherits System.Web.UI.Page - - - Protected Sub Page_Load(sender As Object, e As EventArgs) If txt_Username.Text = "" Then Try @@ -18,7 +15,6 @@ Partial Class login_ForgotPW MsgBox(ex.Message) End Try End If - End Sub Protected Sub btn_Back_Click(sender As Object, e As EventArgs) Response.Redirect("login/login_FLEX.aspx") @@ -165,17 +161,20 @@ Partial Class login_ForgotPW If MsgBox(Msg, Style, Title).Retry Then genToken(username, password, email) + If SendEmail(username, password, email, token) = False Then + MsgBox("Email konnte wegen eines internen Verschlüsselungsfehlers nicht gesendet werden.", vbOK + vbInformation + vbDefaultButton1, "TokengenerierungsFehler") + Else + MsgBox("Email wurde erfolgreich gesendet." & vbCr & "Bitte Postfach überprüfen!", vbOK + vbInformation + vbDefaultButton1, "Tokengenerierungs erfolgreich!") + End If Else - MsgBox("Tokengenerierung nicht erfolgreich." & vbCrLf & "In 5 Sekunden nochmal versuchen!") + MsgBox("Tokengenerierung nicht erfolgreich." & vbCrLf & "In 5 Sekunden nochmal versuchen!") Dim jetzt As DateTime = DateTime.UtcNow Dim wenn As DateTime = DateTime.UtcNow.AddMinutes(-3) - Token_tmr.Interval = 3000 - Token_tmr.Enabled = True + If jetzt < DateTime.UtcNow.AddSeconds(-5) Then Return "NotYet" Else - Token_tmr.Enabled = False token = Convert.ToBase64String(time.Concat(Key).ToArray()) Return token End If @@ -189,8 +188,9 @@ Partial Class login_ForgotPW Dim data() As Byte = Convert.FromBase64String(tokenname) Dim wenn As DateTime = DateTime.FromBinary(BitConverter.ToInt64(data, 0)) If wenn < DateTime.UtcNow.AddMinutes(-30) Then - Return False + tokenname = "" MsgBox("Token nicht gefunden oder zu alt!" + Environment.NewLine + "Bitte erneut Mail senden!") + Return False ElseIf tokenname = "NotYet" Then Return False Else diff --git a/login/login_FLEX.aspx b/login/login_FLEX.aspx index 8e9fc0f..9f427f5 100644 --- a/login/login_FLEX.aspx +++ b/login/login_FLEX.aspx @@ -63,92 +63,88 @@ } - - - <%Dim veragregex = New RegexSammlung_VERAG() - Dim regexUID As String = veragregex.getregUID() - Dim regexPWVal As String = veragregex.getregPassword()%> + <%Dim veragregex = New RegexSammlung_VERAG() + Dim regexUID As String = veragregex.getregUID() + Dim regexPWVal As String = veragregex.getregPassword()%> +
- + -
- - - - - - - +
+
-
+ + + + - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - + + + - - - + + + + + + + + + + + + + + + + + + + + - +
+ +
Kundennummer: - -
- Die Kundennummer ist erforderlich. -
- + +
+ Die Kundennummer ist erforderlich. + + +
Benutzername: - - -
- Der Benutzername ist erforderlich. -
- Kennwort: - - -
- Bitte Passwort angeben. -
- -
- -
-
-
- Admin-Login + +
+ Der Benutzername ist erforderlich.
+
+ Kennwort: + + +
+ Bitte Passwort angeben. + +
+ +
+ +
+
+
+ Admin-Login +
<%Dim url As String = Session.Keys.Item("urltochangepw") %> Passwort Vergessen -
diff --git a/login/login_FLEX.aspx.vb b/login/login_FLEX.aspx.vb index b1a0e33..25b6375 100644 --- a/login/login_FLEX.aspx.vb +++ b/login/login_FLEX.aspx.vb @@ -5,10 +5,7 @@ Partial Class login_login_TEST Inherits System.Web.UI.Page Dim CustomerIDTextBox As TextBox Protected Sub Page_Load(sender As Object, e As EventArgs) - If Not IsPostBack Then - Dim varlink As String = Request.Url.ToString - Response.Redirect(varlink, False) - End If + End Sub Protected Sub ValidateUser(sender As Object, e As EventArgs) Dim userId As Integer = 0