ChangePW wurde zur Fehlervermeidung neu erstellt

This commit is contained in:
ja
2021-10-21 16:57:32 +02:00
parent 51a84e3b33
commit a128bd0cf0
4 changed files with 56 additions and 81 deletions

View File

@@ -1,16 +1,15 @@
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ChangePW.aspx.vb" Inherits="ChangePW" %>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Change_PW.aspx.vb" Inherits="login_Change_PW" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ import Namespace="MySql.Data.MySqlClient"%>
<!-- Bootstrap -->
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- Bootstrap -->
<html lang="en"></html>
<!-- Required meta tags -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" title="Verag Spedition AG AvisoTV Flex"/>
<meta name="viewport" content="width=device-width, initial-scale=1" title="Verag Spedition AG ChangePW"/>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"/>
@@ -35,6 +34,8 @@
document.getElementById("UserID").focus();
}
</script>
<%@ import Namespace="MySql.Data.MySqlClient"%>
<script type="text/javascript">
// Vergebe den Event-Handler
document.onkeydown = handleKeyEvent;
@@ -49,33 +50,11 @@
}
}
</script>
<!-- <script type="text/javascript" src="../js/toptions/top_up-min.js"></script> -->
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if lte IE 5.5999]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<!--[if gte IE 5.5]>
<link rel="stylesheet" type="text/css" href="../css/main.css">
<![endif]-->
<script type = "text/javascript">
function goBack()
{
window.history.back()
}
</script>
<script type = "text/javascript">
function goBack() {
window.history.back()
}
</script>
<style>
.bg-key-icon {
background: url("../../images/Icons/service/key-icon-png-22_small.png") no-repeat 1.75% 10px white;
@@ -147,28 +126,28 @@
}
</style>
</head>
<body>
<div id="content_container">
<div class="container-fluid">
<form id="form1" runat="server">
<center>
<!-- Große Bildschirme-->
<!-- Große Bildschirme-->
<div class="d-none d-md-block">
<table id="tbl_main" cellpadding="0" style="margin: 2px 4px 1px 2px;border:none; width:400px">
<tr style="color:#003680;height:38px;">
<td>
<asp:Label ID="lbl_Ueberschrift" runat="server" Text="Password change:" style="margin-left:55px"></asp:Label>
</td>
</tr>
<tr style="color:#003680;height:26.67px;">
<td colspan="4">
<asp:TextBox id="txt_Pw" CssClass="bg-key-icon" runat="server" TextMode="Password" Width="250px" Font-Names="Verdana" OnTextChanged="txt_Pw_TextChanged" AutoCompleteType="Disabled" style="margin-left:42px;color:#003680" OnClick="this.value='';" Placeholder="Enter Password"></asp:TextBox>
<span></span>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/Icons/service/hilfe.png" Height="13px" Width="13px" style="margin-left:32px" ToolTip="The Password has to contain minimum 4 characters. It must have at least 1 special character, one uppercase letter and at least 1 downcase letter at an maximum of 30 characters."/>
</td>
</tr>
<tr style="color:#003680;height:10px;">
<table id="main_table" runat="server" cellpadding="0" style="margin: 2px 4px 2px 2px; border:none" Width="400px">
<tr style="color:#003680;height:38px;">
<td>
<asp:Label ID="lbl_Ueberschrift" runat="server" Text="Password change:" style="margin-left:55px"></asp:Label>
</td>
</tr>
<tr style="color:#003680;height:26.67px;">
<td colspan="4">
<asp:TextBox id="txt_Pw" CssClass="bg-key-icon" runat="server" TextMode="Password" Width="250px" Font-Names="Verdana" OnTextChanged="txt_Pw_TextChanged" AutoCompleteType="Disabled" style="margin-left:42px;color:#003680" OnClick="this.value='';" Placeholder="Enter Password"></asp:TextBox>
<span></span>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/Icons/service/hilfe.png" Height="13px" Width="13px" style="margin-left:32px" ToolTip="The Password has to contain minimum 4 characters. It must have at least 1 special character, one uppercase letter and at least 1 downcase letter at an maximum of 30 characters."/>
</td>
</tr>
<tr style="color:#003680;height:10px;">
<td>
<asp:RegularExpressionValidator ID="reqPassw1txt" style="margin-left:32px;" runat="server" ControlToValidate="txt_Pw" ValidationGroup="TXT_val" ForeColor="Red" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
</td>
@@ -198,7 +177,12 @@
<asp:RegularExpressionValidator ID="regexval_txt_Pw_WH" style="margin-left:32px;" runat="server" ControlToValidate="txt_Pw_WH" ValidationGroup="TXT_val" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ForeColor="Red" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
</td>
</tr>
</table>
<tr>
<td>
<asp:Label ID="lbl_messagetext" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>
</div>
<!--Smartphone-Bildschirme-->
<div class="d-md-none">
@@ -244,30 +228,14 @@
<asp:CompareValidator ID="confirmPasswordReq_M" runat="server" ControlToCompare="txt_Pw_M" ControlToValidate="txt_Pw_WH_M" ValidationGroup="TXT_val_WH_M" Font-Size="19" ForeColor="Red" ErrorMessage="Please try again! The passwords didn't match." Display="Dynamic"></asp:CompareValidator>
<asp:RegularExpressionValidator ID="regexval_txt_Pw_WH_M" runat="server" ControlToValidate="txt_Pw_WH_M" ValidationGroup="TXT_val_WH_M" ForeColor="Red" Font-Size="19" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
<asp:RegularExpressionValidator ControlToValidate="txt_Pw_M" runat="server" ID="regexval_txt_Pw_M" ValidationGroup="TXT_val_M" ForeColor="Red" Font-Size="19" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
<asp:Label ID="lbl_messagetext" runat="server" Text=""></asp:Label>
<asp:Label ID="lbl_messagetext_M" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>
</div>
</center>
</center>
</form>
</div>
</div>
<script type="text/javascript" src="../js/geturlofsite.js">
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).on("click", function (e) {
if ($(e.target).is("#Image1_M")) {
alert("The Password has to contain minimum 4 characters. It must have at least 1 special character, one uppercase letter and at least 1 downcase letter at an maximum of 30 characters");
} else if ($(e.target).is("#Image2_M")) {
alert("The passwords have to match with each other.");
}
});
</script>
</div>
</div>
</body>
</html>

View File

@@ -1,7 +1,7 @@
Imports System.Data.SqlClient
Imports System.Data

Imports System.Data.SqlClient
Partial Class ChangePW
Partial Class login_Change_PW
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs)

View File

@@ -526,7 +526,7 @@ Partial Class ForgotPW
Dim Ausschusstext2 As String = "und Zinsen zuletzt auf Zölle angerechnet. Zahlbar und klagbar in Schärding oder Ried. Steuer-Zoll-und Tarifauskünfte sind unverbindlich."
Dim Ausschusstext3 As String = "We operate exclusively on the basis of the General Freight Forwarding Terms and Conditions in the respectively applicable version. Payments are initially"
Dim Ausschusstext4 As String = "charged on freight, fees and interests and at last on customs duties. The place of jurisdiction: Schärding / Ried. Tax, customs and tariff information are not binding."
htmlbody = String.Format("Dear {0},<br /><br /> Please follow the Link to reset your password:<br /><br />" + Environment.NewLine + "<a runat=" + "server" + " href=http://" + getdomianenvironment + ServPort + "/login/ChangePW.aspx?Par1=" + tokenname + "&Par2=" + VERAG_PROG_ALLGEMEIN.cCryptography2.Encrypt(username) + "&Par3=" + userID + ">http://" + getdomianenvironment + ServPort + "/login/ChangePW.aspx?Par1=" + VERAG_PROG_ALLGEMEIN.cCryptography.Encrypt(tokenname) + "&Par2=" + VERAG_PROG_ALLGEMEIN.cCryptography2.Encrypt(username) + "&Par3=" + userID + "</a>" + Environment.NewLine + "<br /><br /><br />Kind regards, <br /><span style='color: #043381'><b>VERAG | EDV Support</b></span><br /><span style='color: #043381'>VERAG Spedition AG | A 4975 Suben, Nr. 100</span><br /><span style='color: #043381'>T.<a href='tel:+43 7711 2777-xx'>+43 7711 2777-xx</a> |<a href='mailto:@support@verag.ag'>support@verag.ag</a> |" + emailnr + "FN xxxxxxx</span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext2 + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext3 + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext4 + "</i></span><br />", username, password)
htmlbody = String.Format("Dear {0},<br /><br /> Please follow the Link to reset your password:<br /><br />" + Environment.NewLine + "<a runat=" + "server" + " href=http://" + getdomianenvironment + ServPort + "/login/Change_PW.aspx?Par1=" + tokenname + "&Par2=" + VERAG_PROG_ALLGEMEIN.cCryptography2.Encrypt(username) + "&Par3=" + userID + ">http://" + getdomianenvironment + ServPort + "/login/ChangePW.aspx?Par1=" + VERAG_PROG_ALLGEMEIN.cCryptography.Encrypt(tokenname) + "&Par2=" + VERAG_PROG_ALLGEMEIN.cCryptography2.Encrypt(username) + "&Par3=" + userID + "</a>" + Environment.NewLine + "<br /><br /><br />Kind regards, <br /><span style='color: #043381'><b>VERAG | EDV Support</b></span><br /><span style='color: #043381'>VERAG Spedition AG | A 4975 Suben, Nr. 100</span><br /><span style='color: #043381'>T.<a href='tel:+43 7711 2777-xx'>+43 7711 2777-xx</a> |<a href='mailto:@support@verag.ag'>support@verag.ag</a> |" + emailnr + "FN xxxxxxx</span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext2 + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext3 + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext4 + "</i></span><br />", username, password)
ElseIf String.IsNullOrWhiteSpace(HttpContext.Current.Request.ServerVariables("SERVER_NAME")) = True Then
getdomianenvironment = HttpContext.Current.Request.ServerVariables("SERVER_NAME")
MsgBox(getdomianenvironment)
@@ -538,7 +538,7 @@ Partial Class ForgotPW
Dim Ausschusstext2 As String = "und Zinsen zuletzt auf Zölle angerechnet. Zahlbar und klagbar in Schärding oder Ried. Steuer-Zoll-und Tarifauskünfte sind unverbindlich."
Dim Ausschusstext3 As String = "We operate exclusively on the basis of the General Freight Forwarding Terms and Conditions in the respectively applicable version. Payments are initially"
Dim Ausschusstext4 As String = "charged on freight, fees and interests and at last on customs duties. The place of jurisdiction: Schärding / Ried. Tax, customs and tariff information are not binding."
htmlbody = String.Format("Dear {0},<br /><br /> Please follow the Link to reset your password:<br /><br />" + Environment.NewLine + "<a runat=" + "server" + " href=http://" + getdomianenvironment + "/login/ChangePW.aspx?Par1=" + tokenname + "&Par2=" + VERAG_PROG_ALLGEMEIN.cCryptography2.Encrypt(username) + "&Par3=" + userID + ">http://" + getdomianenvironment + ServPort + "/login/ChangePW.aspx?Par1=" + tokenname + "&Par2=" + VERAG_PROG_ALLGEMEIN.cCryptography2.Encrypt(username) + "&Par3=" + userID + "</a>" + Environment.NewLine + "<br /><br /><br />Kind regards, <br /><span style='color: #043381'><b>VERAG | EDV Support</b></span><br /><span style='color: #043381'>VERAG Spedition AG | A 4975 Suben, Nr. 100</span><br /><span style='color: #043381'>T.<a href='tel:+43 7711 2777-xx'>+43 7711 2777-xx</a> |<a href='mailto:@support@verag.ag'>support@verag.ag</a> | " + emailnr + "FN xxxxxxx</span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext2 + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext3 + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext4 + "</i></span><br />", username, password)
htmlbody = String.Format("Dear {0},<br /><br /> Please follow the Link to reset your password:<br /><br />" + Environment.NewLine + "<a runat=" + "server" + " href=http://" + getdomianenvironment + "/login/Change_PW.aspx?Par1=" + tokenname + "&Par2=" + VERAG_PROG_ALLGEMEIN.cCryptography2.Encrypt(username) + "&Par3=" + userID + ">http://" + getdomianenvironment + ServPort + "/login/ChangePW.aspx?Par1=" + tokenname + "&Par2=" + VERAG_PROG_ALLGEMEIN.cCryptography2.Encrypt(username) + "&Par3=" + userID + "</a>" + Environment.NewLine + "<br /><br /><br />Kind regards, <br /><span style='color: #043381'><b>VERAG | EDV Support</b></span><br /><span style='color: #043381'>VERAG Spedition AG | A 4975 Suben, Nr. 100</span><br /><span style='color: #043381'>T.<a href='tel:+43 7711 2777-xx'>+43 7711 2777-xx</a> |<a href='mailto:@support@verag.ag'>support@verag.ag</a> | " + emailnr + "FN xxxxxxx</span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext2 + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext3 + "</i></span><br /><span style='color: #043381;font-size:12px'><i>" + Ausschusstext4 + "</i></span><br />", username, password)
ElseIf String.IsNullOrWhiteSpace(HttpContext.Current.Request.ServerVariables("SERVER_NAME")) = True Then
'MsgBox("Error09:" + Environment.NewLine + "The Domain could not be vaildated. Check Link please or contact the Administrator of the program.")
lblMessage.ForeColor = Color.OrangeRed

View File

@@ -87,7 +87,7 @@ Partial Class login_FLEX
reqfieldvaluserName.ErrorMessage = "Username has to be given."
End If
End If
If String.IsNullOrEmpty(tb2.Text) = False AndAlso String.IsNullOrEmpty(tb2_M.Text) = True Then
If String.IsNullOrEmpty(tb2_M.Text) = False AndAlso String.IsNullOrEmpty(tb2.Text) = True Then
reqfieldvaluserName.Enabled = False
reqfieldvaluserName_M.Enabled = True
reqfieldvaluserName_M.Validate()
@@ -108,15 +108,22 @@ Partial Class login_FLEX
End If
passw = tb3.Text
End If
If String.IsNullOrEmpty(tb3.Text) = False AndAlso String.IsNullOrEmpty(tb3_M.Text) = True Then
reqfieldvalpassw.Enabled = True
reqfieldvalpassw_M.Enabled = False
reqfieldvalpassw.Validate()
If reqfieldvalpassw.IsValid = True Then
End If
passw = tb3_M.Text
End If
End If
If reqfieldvalpassw_M.IsValid AndAlso String.IsNullOrEmpty(tb3.Text) = False AndAlso String.IsNullOrEmpty(tb3_M.Text) = True Then
If String.IsNullOrEmpty(tb3.Text) = False AndAlso String.IsNullOrEmpty(tb3_M.Text) = True Then
reqfieldvalpassw.Enabled = False
reqfieldvalpassw_M.Enabled = True
reqfieldvalpassw_M.Validate()
If reqfieldvalpassw_M.IsValid = True Then
passw = tb3_M.Text
Else
reqfieldvalpassw_M.ErrorMessage = "Password has to be given."
End If
End If
' Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString