Fixen des bugs
This commit is contained in:
@@ -321,8 +321,7 @@
|
|||||||
<ul style="list-style:circle;margin-left:48px">
|
<ul style="list-style:circle;margin-left:48px">
|
||||||
<li>
|
<li>
|
||||||
<asp:Label ID="Label3" runat="server" style="color:#003680;margin-left:2px">1 Uppercase</asp:Label>
|
<asp:Label ID="Label3" runat="server" style="color:#003680;margin-left:2px">1 Uppercase</asp:Label>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:Label ID="Label4" runat="server" style="color:#003680;margin-left:2px">1 Downcase </asp:Label>
|
<asp:Label ID="Label4" runat="server" style="color:#003680;margin-left:2px">1 Downcase </asp:Label>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -193,47 +193,48 @@ Partial Class login_Change_PW
|
|||||||
txt_Pw_WH.Enabled = True
|
txt_Pw_WH.Enabled = True
|
||||||
regexval_txt_Pw.Validate()
|
regexval_txt_Pw.Validate()
|
||||||
End If
|
End If
|
||||||
|
If regexval_txt_Pw.IsValid = True Then
|
||||||
|
Try
|
||||||
|
Dim ConnectionString = ""
|
||||||
|
Dim usrname As String = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par2"))
|
||||||
|
Dim UsrID As String = VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(Request.QueryString("Par3"))
|
||||||
|
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
|
||||||
|
'ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=sa;Pwd=BmWr501956"
|
||||||
|
ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
|
||||||
|
Else
|
||||||
|
ConnectionString = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
|
||||||
|
'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
|
||||||
|
End If
|
||||||
|
If regexval_txt_Pw.IsValid = True Then
|
||||||
|
Using con As New SqlConnection(ConnectionString)
|
||||||
|
Using cmd As New SqlCommand("UPDATE [VERAG_HOMEPAGE].[dbo].[Users] SET [Password]=@Password WHERE [Username]=@Username AND [UserId]=@UserId")
|
||||||
|
' cmd.CommandType = CommandType.StoredProcedure
|
||||||
|
cmd.Parameters.AddWithValue("@Username", usrname)
|
||||||
|
cmd.Parameters.AddWithValue("@Password", txt_Pw_WH.Text)
|
||||||
|
cmd.Parameters.AddWithValue("@UserId", UsrID)
|
||||||
|
cmd.Connection = con
|
||||||
|
con.Open()
|
||||||
|
If String.IsNullOrEmpty(usrname) = False Then
|
||||||
|
cmd.ExecuteNonQuery()
|
||||||
|
btn_submitpw.Visible = True
|
||||||
|
Else
|
||||||
|
VERAG_VARIABLES.seterrorcount(25)
|
||||||
|
lbl_messagetext.Text = VERAG_VARIABLES.geterrornumb() + "Fehler bei der Behebung des Passwortwechsels."
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
con.Close()
|
||||||
|
End Using
|
||||||
|
|
||||||
Try
|
Else
|
||||||
Dim ConnectionString = ""
|
VERAG_VARIABLES.seterrorcount(22)
|
||||||
Dim usrname As String = VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString("Par2"))
|
'lbl_messagetext_M.ForeColor = Drawing.Color.Red
|
||||||
Dim UsrID As String = VERAG_PROG_ALLGEMEIN.cCryptography2.Decrypt(Request.QueryString("Par3"))
|
'lbl_messagetext_M.Text = VERAG_VARIABLES.geterrornumb() + "Error bei der Validierung des Kennwortes."
|
||||||
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
|
End If
|
||||||
'ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=sa;Pwd=BmWr501956"
|
Catch ex As Exception
|
||||||
ConnectionString = "Server=DEVELOPER\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
|
lbl_messagetext.Text = ex.Message
|
||||||
Else
|
End Try
|
||||||
ConnectionString = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Database=VERAG_HOMEPAGE;Uid=AppUser;Pwd=yp/THDd?xM+pZ$;"
|
End If
|
||||||
'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
|
Msg = "PW erfolgreich geändert!"
|
||||||
End If
|
|
||||||
If regexval_txt_Pw.IsValid = True Then
|
|
||||||
|
|
||||||
Using cmd As New SqlCommand("UPDATE [VERAG_HOMEPAGE].[dbo].[Users] SET [Password]=@Password WHERE [Username]=@Username AND [UserId]=@UserId")
|
|
||||||
' cmd.CommandType = CommandType.StoredProcedure
|
|
||||||
cmd.Parameters.AddWithValue("@Username", usrname)
|
|
||||||
cmd.Parameters.AddWithValue("@Password", txt_Pw_WH.Text)
|
|
||||||
cmd.Parameters.AddWithValue("@UserId", UsrID)
|
|
||||||
cmd.Connection = con
|
|
||||||
con.Open()
|
|
||||||
If String.IsNullOrEmpty(usrname) = False Then
|
|
||||||
cmd.ExecuteNonQuery()
|
|
||||||
btn_submitpw.Visible = True
|
|
||||||
Else
|
|
||||||
VERAG_VARIABLES.seterrorcount(25)
|
|
||||||
lbl_messagetext.Text = VERAG_VARIABLES.geterrornumb() + "Fehler bei der Behebung des Passwortwechsels."
|
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
con.Close()
|
|
||||||
End Using
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
VERAG_VARIABLES.seterrorcount(22)
|
|
||||||
'lbl_messagetext_M.ForeColor = Drawing.Color.Red
|
|
||||||
'lbl_messagetext_M.Text = VERAG_VARIABLES.geterrornumb() + "Error bei der Validierung des Kennwortes."
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
lbl_messagetext.Text = ex.Message
|
|
||||||
End Try
|
|
||||||
Msg = "PW erfolgreich geändert!"
|
|
||||||
Style = vbOKOnly + vbInformation + vbDefaultButton1
|
Style = vbOKOnly + vbInformation + vbDefaultButton1
|
||||||
Title = "Information"
|
Title = "Information"
|
||||||
regexval_txt_Pw.ForeColor = Drawing.Color.Green
|
regexval_txt_Pw.ForeColor = Drawing.Color.Green
|
||||||
|
|||||||
Reference in New Issue
Block a user