From dev-return-17134-archive-asf-public=cust-asf.ponee.io@syncope.apache.org Mon Apr 8 10:15:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C80F5180784 for ; Mon, 8 Apr 2019 12:15:02 +0200 (CEST) Received: (qmail 42718 invoked by uid 500); 8 Apr 2019 09:55:24 -0000 Mailing-List: contact dev-help@syncope.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@syncope.apache.org Delivered-To: mailing list dev@syncope.apache.org Received: (qmail 42702 invoked by uid 99); 8 Apr 2019 09:55:24 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2019 09:55:24 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id F2738E2A49 for ; Mon, 8 Apr 2019 10:15:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6DBF72459F for ; Mon, 8 Apr 2019 10:15:00 +0000 (UTC) Date: Mon, 8 Apr 2019 10:15:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@syncope.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SYNCOPE-1457) NonAlphaNumeric policy pattern matches the "Not word" character class MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SYNCOPE-1457?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 812306#comment-16812306 ]=20 ASF subversion and git services commented on SYNCOPE-1457: ---------------------------------------------------------- Commit b2c7e7d9291283ecd631022c0a998ba37a6986c1 in syncope's branch refs/he= ads/2_1_X from Francesco Chicchiricc=C3=B2 [ https://gitbox.apache.org/repos/asf?p=3Dsyncope.git;h=3Db2c7e7d ] [SYNCOPE-1457] Applying the suggested fix + moving classes to move appropri= ate places > NonAlphaNumeric policy pattern matches the "Not word" character class > --------------------------------------------------------------------- > > Key: SYNCOPE-1457 > URL: https://issues.apache.org/jira/browse/SYNCOPE-1457 > Project: Syncope > Issue Type: Bug > Components: core > Affects Versions: 2.0.12, 2.1.3 > Reporter: Dmitriy > Assignee: Francesco Chicchiricc=C3=B2 > Priority: Minor > Fix For: 2.0.13, 2.1.4, 3.0.0 > > > Non-alphanumeric characters look like this https://wci.llnl.gov/codes/bas= is/manual/node161.html > Seems, that next patterns are incorrect:=20 > {code:java} > org.apache.syncope.core.provisioning.api.utils.policy.PolicyPattern#NON_A= LPHANUMERIC =3D Pattern.compile(".*\\W.*"); > p org.apache.syncope.core.provisioning.api.utils.policy.PolicyPattern= #FIRST_NON_ALPHANUMERIC =3D Pattern.compile("\\W.*"); > org.apache.syncope.core.provisioning.api.utils.policy.PolicyPattern#LA= ST_NON_ALPHANUMERIC =3D Pattern.compile(".*\\W"); > {code} > Looks like these pattern should be anyhow symmetric to the: > {code:java} > org.apache.syncope.core.spring.security.DefaultPasswordGenerator#SPECIAL= _CHARS =3D { '!', '=C2=A3', '%', '&', '(', ')', '?', '#', '$' }; > {code} > Maybe these patterns should look like these:=20 > {code:java} > private static final Pattern NON_ALPHANUMERIC =3D Pattern.compile(".*[~!@= #$%^&*_\\-`(){}\\[\\]:;\"'<>,.?/\\=3D\\+\\\\\\|].*"); > private static final Pattern FIRST_NON_ALPHANUMERIC =3D Pattern.compile("= [~!@#$%^&*_\\-`(){}\\[\\]:;\"'<>,.?/\\=3D\\+\\\\\\|].*"); > private static final Pattern LAST_NON_ALPHANUMERIC =3D Pattern.compile(".= *[~!@#$%^&*_\\-`(){}\\[\\]:;\"'<>,.?/\\=3D\\+\\\\\\|]"); > {code} > =20 -- This message was sent by Atlassian JIRA (v7.6.3#76005)