diff options
| author | Theron Luhn <theron@luhn.com> | 2019-12-14 19:12:01 -0600 |
|---|---|---|
| committer | Theron Luhn <theron@luhn.com> | 2019-12-14 19:12:28 -0600 |
| commit | d699c9ace8028bf74e1c6c3ea085fdf9beeb2586 (patch) | |
| tree | e784f234a95ec288ab80b988dee0f771e7a35fac /src | |
| parent | eda8787d00b31dc90164e5c233bfb1cc1f94eaed (diff) | |
| download | pyramid-d699c9ace8028bf74e1c6c3ea085fdf9beeb2586.tar.gz pyramid-d699c9ace8028bf74e1c6c3ea085fdf9beeb2586.tar.bz2 pyramid-d699c9ace8028bf74e1c6c3ea085fdf9beeb2586.zip | |
Raise error on kwargs in `LegacySecurityPolicy.forget`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/pyramid/security.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pyramid/security.py b/src/pyramid/security.py index f07bc0bfe..e3a978c52 100644 --- a/src/pyramid/security.py +++ b/src/pyramid/security.py @@ -439,8 +439,12 @@ class LegacySecurityPolicy: return authn.remember(request, userid, **kw) def forget(self, request, **kw): + if kw: + raise ValueError( + 'Legacy authentication policies do not support keyword ' + 'arguments for `forget`' + ) authn = self._get_authn_policy(request) - # XXX log warning if varkwargs were passed? return authn.forget(request) def permits(self, request, context, permission): |
