Verbesserung derSicherheit der Tokenabfrage bzw dessen Generierung
This commit is contained in:
@@ -5,16 +5,20 @@ Partial Class login_ChangePW
|
|||||||
Protected Sub Page_Load(sender As Object, e As EventArgs)
|
Protected Sub Page_Load(sender As Object, e As EventArgs)
|
||||||
Dim url = Request.ServerVariables("URL")
|
Dim url = Request.ServerVariables("URL")
|
||||||
Session.Add("urltochangepw", url)
|
Session.Add("urltochangepw", url)
|
||||||
|
If VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Session.Item("TokenforEmail").ToString()) = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par1")) Or VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Session.Item("TokenforEmail").ToString()) = Not Nothing Then
|
||||||
|
If getDateoftoken(VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par1"))) = True Then
|
||||||
|
txt_Pw_WH.Enabled = False
|
||||||
|
regexval_txt_Pw_WH.Enabled = False
|
||||||
|
If IsPostBack Then
|
||||||
|
reqPasswtxt.Validate()
|
||||||
|
reqPassw1txt.Validate()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
btn_submitpw.Enabled = False
|
||||||
|
|
||||||
If getDateoftoken(VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par1"))) = True Then
|
|
||||||
txt_Pw_WH.Enabled = False
|
|
||||||
regexval_txt_Pw_WH.Enabled = False
|
|
||||||
If IsPostBack Then
|
|
||||||
reqPasswtxt.Validate()
|
|
||||||
reqPassw1txt.Validate()
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
btn_submitpw.Enabled = False
|
MsgBox("Link ist abgelaufen. Bitte neue E-Mail senden.", MsgBoxStyle.Critical, "Error06")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ Partial Class login_ForgotPW
|
|||||||
con.Close()
|
con.Close()
|
||||||
End Using
|
End Using
|
||||||
tokenname = genToken(username, password, email)
|
tokenname = genToken(username, password, email)
|
||||||
|
Session.Add("TokenforEmail", tokenname)
|
||||||
If SendEmail(username, password, email, tokenname) = True Then
|
If SendEmail(username, password, email, tokenname) = True Then
|
||||||
'password = RandomString(New Random, 10)
|
'password = RandomString(New Random, 10)
|
||||||
If (getDateoftoken(tokenname) = True) Then
|
If (getDateoftoken(tokenname) = True) Then
|
||||||
|
|||||||
Reference in New Issue
Block a user