Skip to content

Commit 1b0ad46

Browse files
committed
Bugfix: stricter regex; disallow trailing newline
1 parent 6ee221b commit 1b0ad46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/saml/src/Auth/Process/SubjectID.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ class SubjectID extends Auth\ProcessingFilter
5656
*
5757
* @var string
5858
*/
59-
public const SCOPE_PATTERN = '/^[a-z0-9][a-z0-9.-]{0,126}$/i';
59+
public const SCOPE_PATTERN = '/^[a-z0-9][a-z0-9.-]{0,126}$/Di';
6060

6161
/**
6262
* The regular expression to match the specifications
6363
*
6464
* @var string
6565
*/
66-
public const SPEC_PATTERN = '/^[a-z0-9][a-z0-9=-]{0,126}@[a-z0-9][a-z0-9.-]{0,126}$/i';
66+
public const SPEC_PATTERN = '/^[a-z0-9][a-z0-9=-]{0,126}@[a-z0-9][a-z0-9.-]{0,126}$/Di';
6767

6868
/**
6969
* The regular expression to match worrisome identifiers that need to raise a warning
7070
*
7171
* @var string
7272
*/
73-
public const WARN_PATTERN = '/^[a-z0-9][a-z0-9=-]{3,}@[a-z0-9][a-z0-9.-]+\.[a-z]{2,}$/i';
73+
public const WARN_PATTERN = '/^[a-z0-9][a-z0-9=-]{3,}@[a-z0-9][a-z0-9.-]+\.[a-z]{2,}$/Di';
7474

7575
/**
7676
* The attribute we should generate the subject id from.

0 commit comments

Comments
 (0)