Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit f2ec1fc

Browse files
committed
chore: remove deprecated mode values from ProxyFilter
BREAKING CHANGE: removed support for deprecated values blacklist and whitelist
1 parent 06568b6 commit f2ec1fc

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

lib/Auth/Process/ProxyFilter.php

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ class ProxyFilter extends ProcessingFilter
2323

2424
public const MODE_ALLOWLIST = 'allowlist';
2525

26-
public const MODE_BLACKLIST = 'blacklist';
27-
28-
public const MODE_WHITELIST = 'whitelist';
29-
30-
public const MODES = [self::MODE_DENYLIST, self::MODE_ALLOWLIST, self::MODE_BLACKLIST, self::MODE_WHITELIST];
26+
public const MODES = [self::MODE_DENYLIST, self::MODE_ALLOWLIST];
3127

3228
private $authproc;
3329

@@ -49,16 +45,7 @@ public function __construct($config, $reserved)
4945
$this->filterSPs = $conf->getArray('filterSPs', []);
5046
$this->filterAttributes = $conf->getArray('filterAttributes', []);
5147

52-
// TODO: remove
53-
$mode = $conf->getValueValidate('mode', self::MODES, self::MODE_DENYLIST);
54-
if (in_array($mode, [self::MODE_BLACKLIST, self::MODE_WHITELIST], true)) {
55-
Logger::warn(
56-
'perun:ProxyFilter: You are using a deprecated value for the option "mode". Please switch to "allowlist" or "denylist".'
57-
);
58-
$this->mode = $mode === self::MODE_BLACKLIST ? self::MODE_DENYLIST : self::MODE_ALLOWLIST;
59-
} else {
60-
$this->mode = $mode;
61-
}
48+
$this->mode = $conf->getValueValidate('mode', self::MODES, self::MODE_DENYLIST);
6249

6350
$this->authproc = $conf->getArray('authproc', []);
6451
$this->authproc[] = $conf->getArray('config', []);

0 commit comments

Comments
 (0)