From fc37d5f31014cfc8071c257d7f492a537c43ce28 Mon Sep 17 00:00:00 2001 From: Alexander Trofimov Date: Sat, 17 Jan 2015 01:32:10 +0700 Subject: [PATCH] =?UTF-8?q?wsp-10285=20Add=20the=20symbol=20=E2=80=9C=5F?= =?UTF-8?q?=E2=80=9D=20in=20the=20category=20of=20Non-alphanumeric=20symbo?= =?UTF-8?q?ls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WebsitePanel/UserControls/PasswordControl.ascx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs index ccd7e451..15473082 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordControl.ascx.cs @@ -220,7 +220,7 @@ namespace WebsitePanel.Portal function wspValidatePasswordSymbols(source, args) { if(args.Value == source.getAttribute('dpsw')) return true; - args.IsValid = wspValidatePattern(/(\W)/g, args.Value, + args.IsValid = wspValidatePattern(/([\W_])/g, args.Value, parseInt(source.getAttribute('minimumNumber'))); } @@ -357,7 +357,7 @@ namespace WebsitePanel.Portal protected void valRequireSymbols_ServerValidate(object source, ServerValidateEventArgs args) { - args.IsValid = ((args.Value == EMPTY_PASSWORD) || ValidatePattern("(\\W)", args.Value, MinimumSymbols)); + args.IsValid = ((args.Value == EMPTY_PASSWORD) || ValidatePattern("([\\W_])", args.Value, MinimumSymbols)); } private bool ValidatePattern(string regexp, string val, int minimumNumber)