Skip to content

Commit

Permalink
PHPCAS-69 The CAS_ProxyChain now allows PCRE regex pattern modifiers.
Browse files Browse the repository at this point in the history
See: http://www.php.net/manual/reference.pcre.pattern.modifiers.php

Allowed modifiers:
	i (PCRE_CASELESS)
	x (PCRE_EXTENDED)
	A (PCRE_ANCHORED)
	S
	U (PCRE_UNGREEDY)
	X (PCRE_EXTRA)
	u (PCRE8)

Disallowed modifiers:
	m (PCRE_MULTILINE)      URLs should only ever be a single line, so this doesn't apply.
	s (PCRE_DOTALL)         URLs should only ever be a single line, so this doesn't apply.
	e (PREG_REPLACE_EVAL)   No replacements are being done, so this doesn't apply.
	D (PCRE_DOLLAR_ENDONLY) URLs should only ever be a single line, so this doesn't apply.
	J (PCRE_INFO_JCHANGED)  No subpatterns are being extracted, so this doesn't apply.

git-svn-id: https://source.jasig.org/cas-clients/phpcas/branches/PHPCAS-69@24840 f5dbab47-78f9-eb45-b975-e544023573eb
  • Loading branch information
adamfranco committed Aug 30, 2011
1 parent 9a54abe commit 1812c97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/CAS/ProxyChain.php
Expand Up @@ -69,7 +69,7 @@ public function matches(array $list) {
$mismatch = false;
foreach ($this->_chain as $i => $search) {
$proxy_url = $list[$i];
if (preg_match('/^\/.*\//',$search)) {
if (preg_match('/^\/.*\/[ixASUXu]*$/s',$search)) {
if (preg_match($search, $proxy_url)) {
phpCAS::trace("Found regexp " . $search . " matching " . $proxy_url);
} else {
Expand Down

0 comments on commit 1812c97

Please sign in to comment.