[Bug 1267005] New PW containing the special character "§" is rejected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1267005

Petr Pisar <ppisar@xxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppisar@xxxxxxxxxx



--- Comment #11 from Petr Pisar <ppisar@xxxxxxxxxx> ---
(In reply to Matt Tyson from comment #9)
> (In reply to joerg.lechner from comment #8)
> > keyboard (a German keyboard) in the line !"§$%&/()=?`, I myself assume, I
> > can use all characters in this line to meet the PW requirements.
> 
> Ahh that makes more sense now.  Bugzilla uses a perl [[:punct:]] regex to
> determine the characters ( http://perldoc.perl.org/perlrecharclass.html ). 
> It doesn't consider that character to be punctuation. 
> 
[[:punct::]] is alias for \p{PosixPunct} in ASCII range. POSIX does not
consider the `§' as a punctuation.

Please read perlrecharclass POD, especially note #5:

    [5] "\p{PosixPunct}" and "[[:punct:]]" in the ASCII range match all
        non-controls, non-alphanumeric, non-space characters:
        "[-!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~]" (although if a locale is in
        effect, it could alter the behavior of "[[:punct:]]").

        The similarly named property, "\p{Punct}", matches a somewhat
        different set in the ASCII range, namely
        "[-!"#%&'()*,./:;?@[\\\]_{}]". That is, it is missing the nine
        characters "[$+<=>^`|~]". This is because Unicode splits what POSIX
        considers to be punctuation into two categories, Punctuation and
        Symbols.

        "\p{XPosixPunct}" and (under Unicode rules) "[[:punct:]]", match what
        "\p{PosixPunct}" matches in the ASCII range, plus what "\p{Punct}"
        matches. This is different than strictly matching according to
        "\p{Punct}". Another way to say it is that if Unicode rules are in
        effect, "[[:punct:]]" matches all characters that Unicode considers
        punctuation, plus all ASCII-range characters that Unicode considers
        symbols.

Probably you want to match against \p{Punct} or switch to Unicode semtantics:

$ perl -e 'q{§} =~ /[[:punct:]]/ and print qq{match\n}'
$ perl -e 'q{§} =~ /[[:punct:]]/a and print qq{match\n}'
$ perl -e 'q{§} =~ /[[:punct:]]/u and print qq{match\n}'
match
$ perl -e 'q{§} =~ /\p{PosixPunct}/ and print qq{match\n}'
$ perl -e 'q{§} =~ /\p{XPosixPunct}/ and print qq{match\n}'
match
$ perl -e 'q{§} =~ /\p{Punct}/ and print qq{match\n}'
match

-- 
You are receiving this mail because:
You are on the CC list for the bug.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel




[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux