Verbesserte Sicherheit bei Eingabe
This commit is contained in:
@@ -13,21 +13,27 @@ Partial Class login_ForgotPW
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub btn_Send_Click(sender As Object, e As EventArgs)
|
Protected Sub btn_Send_Click(sender As Object, e As EventArgs)
|
||||||
Dim username As String = txt_Username.Text
|
Dim username As String = String.Empty
|
||||||
Dim password As String = String.Empty
|
Dim password As String = String.Empty
|
||||||
Dim email As String = String.Empty
|
Dim email As String = String.Empty
|
||||||
Dim tokenname As String = String.Empty
|
Dim tokenname As String = String.Empty
|
||||||
valreqtxtEmail.Validate()
|
valreqtxtEmail.Validate()
|
||||||
check_UserName_regex.Validate()
|
check_UserName_regex.Validate()
|
||||||
If valreqtxtEmail.IsValid = True Then
|
If valreqtxtEmail.IsValid = True AndAlso check_UserName_regex.IsValid = True Then
|
||||||
email = txtEmail.Text
|
email = txtEmail.Text
|
||||||
|
username = txt_Username.Text
|
||||||
ElseIf valreqtxtEmail.IsValid = False Then
|
ElseIf valreqtxtEmail.IsValid = False Then
|
||||||
valreqtxtEmail.ErrorMessage = "Annotation: The given Domain is not the company domain."
|
valreqtxtEmail.ErrorMessage = "Annotation: The given Domain is not the company domain."
|
||||||
regexval_txt_Email.Validate()
|
regexval_txt_Email.Validate()
|
||||||
valreqtxtEmail.IsValid = True
|
valreqtxtEmail.IsValid = True
|
||||||
|
If check_UserName_regex.IsValid = False Then
|
||||||
|
check_UserName_regex.ErrorMessage = "Annotation: The Username does not match the requirements."
|
||||||
|
Else
|
||||||
|
check_UserName_regex.IsValid = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If String.IsNullOrEmpty(email) = False AndAlso String.IsNullOrEmpty(tokenname) = True AndAlso String.IsNullOrEmpty(password) = True AndAlso String.IsNullOrEmpty(username) = False Then
|
If String.IsNullOrEmpty(email) = False AndAlso String.IsNullOrEmpty(tokenname) = True AndAlso String.IsNullOrEmpty(password) = True AndAlso String.IsNullOrEmpty(username) = False Then
|
||||||
Dim ConnectionString = String.Empty
|
Dim ConnectionString = String.Empty
|
||||||
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
|
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=sa;Pwd=BmWr501956"
|
||||||
@@ -118,7 +124,6 @@ Partial Class login_ForgotPW
|
|||||||
ElseIf String.IsNullOrWhiteSpace(password) = True Then
|
ElseIf String.IsNullOrWhiteSpace(password) = True Then
|
||||||
lblMessage.Text = "An internal password searching error occured in our systems ."
|
lblMessage.Text = "An internal password searching error occured in our systems ."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'MsgBox("The form has not been filled completeley.", MsgBoxStyle.Critical, "Error08")
|
'MsgBox("The form has not been filled completeley.", MsgBoxStyle.Critical, "Error08")
|
||||||
|
|||||||
Reference in New Issue
Block a user