Browse Source

修改密码页面去掉密码校验

master
lvzb 1 year ago
parent
commit
0d20327fa7
  1. 16
      SCP/Admin/user_changepassword.aspx.cs
  2. 2
      SCP/Web.config

16
SCP/Admin/user_changepassword.aspx.cs

@ -36,8 +36,8 @@ namespace SCP.admin
if (!IsPostBack)
{
LoadData();
tbxPassword.Regex = ScpCache.Config.;
tbxPassword.RegexMessage = ScpCache.Config.;
//tbxPassword.Regex = ScpCache.Config.密码验证格式;
//tbxPassword.RegexMessage = ScpCache.Config.密码验证提示语;
}
}
@ -70,12 +70,12 @@ namespace SCP.admin
protected void btnSaveClose_Click(object sender, EventArgs e)
{
Regex _regex = new Regex(ScpCache.Config.);
if (!_regex.IsMatch(tbxPassword.Text.Trim()))
{
Alert.Show(GetResourceKey(ScpCache.Config.));
return;
}
//Regex _regex = new Regex(ScpCache.Config.密码验证格式);
//if (!_regex.IsMatch(tbxPassword.Text.Trim()))
//{
// Alert.Show(GetResourceKey(ScpCache.Config.密码验证提示语));
// return;
//}
int id = GetQueryIntValue("id");
User item = DB.Users.Find(id);
item.Password = PasswordUtil.CreateDbPassword(tbxPassword.Text.Trim());

2
SCP/Web.config

@ -88,7 +88,7 @@
<httpRuntime executionTimeout="120" maxRequestLength="204800" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" enableVersionHeader="false"/>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name=".APPBOX_FORMS_AUTH" loginUrl="~/default.aspx" timeout="3" defaultUrl="~/main.aspx" protection="All" path="/"/>
<forms name=".APPBOX_FORMS_AUTH" loginUrl="~/default_CYJ.aspx" timeout="3" defaultUrl="~/main.aspx" protection="All" path="/"/>
</authentication>
<authorization>
<deny users="?"/>

Loading…
Cancel
Save