Commit cf6dc47a authored by sikeda's avatar sikeda
Browse files

[bug] Tests in code using a few regexps were invalid due to typos. These also...

[bug] Tests in code using a few regexps were invalid due to typos.  These also produce "Unescaped left brace in regex" deprecation warnings many, many times with Perl 5.22 or later.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12616 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 0b7d390b
......@@ -118,7 +118,7 @@ my $oldlocale_re = qr/^([a-z]{2})_([A-Z]{2})(?![A-Z])/i;
## Regexp for IETF language tag described in RFC 5646 (BCP 47), modified.
my $language_tag_re = qr/^
([a-z]{2}(?:-[a-z]{3}){,3} | [a-z]{2,3}) # language (and ext.)
([a-z]{2}(?:-[a-z]{3}){1,3} | [a-z]{2,3}) # language (and ext.)
(?:-([a-z]{4}))? # script
(?:-([a-z]{2}))? # region (no UN M.49)
(?:-( # variant
......
......@@ -132,7 +132,7 @@ sub load {
my $sdm = Sympa::DatabaseManager->instance;
## Load existing session.
if ($cookie and $cookie =~ /^\d{,16}$/) {
if ($cookie and $cookie !~ /[^0-9]/ and length $cookie <= 16) {
## Compatibility: session by older releases of Sympa.
$id_session = $cookie;
$is_old_session = 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment