| Age | Commit message (Collapse) | Author |
|
The ``IAuthorizationPolicy`` is expected to return an instance of
``PermitsResult`` and the ``ACLPermitsResult`` now subclasses this to
form a consistent class hierarchy.
Similarly the ``ACLDenied`` subclasses ``Denied`` and ``ACLAllowed``
subclasses ``Allowed`` for consistency.
|
|
migrate pyramid to use plaster
|
|
- Renamed `SessionCSRFStoragePolicy` to `LegacySessionCSRFStoragePolicy` for
the version that uses the legacy `ISession.get_csrf_token` and
`ISession.new_csrf_token` apis and set that as the default.
- Added new `SessionCSRFStoragePolicy` that stores data in the session
similar to how the `SessionAuthenticationPolicy` works.
- `CookieCSRFStoragePolicy` did not properly return the newly generated
token from `get_csrf_token` after calling `new_csrf_token`. It needed
to cache the new value since the response callback does not affect
the current request.
- `CookieCSRFStoragePolicy` was not forwarding the `domain` value to the
`CookieProfile` causing that setting to be ignored.
- Removed `check_csrf_token` from the `ICSRFStoragePolicy` interface
to simplify implementations of storage policies.
- Added an introspectable item for the configured storage policy so that
it appears on the debugtoolbar.
- Added a change note on `ISession` that it no longer required the csrf methods.
- Leave deprecated shims in ``pyramid.session`` for
``check_csrf_origin`` and ``check_csrf_token``.
|
|
implemenations based on feedback, split CSRF implementation and option configuration and make the csrf token function exposed as a system default rather than a renderer event.
|
|
|
|
regarding naming of variables and code cleanup.
|
|
the session machinery.
Adds configuration of this to the csrf_options configurator commands. Make the default implementation a fallback to the old one. Documentation patches for new best practices given updates CSRF implementation.
|
|
|
|
|
|
|
|
https://travis-ci.org/Pylons/pyramid/jobs/178536008#L406
|
|
|
|
|
|
|
|
|
|
config.set_default_csrf_options
|
|
Add an additional layer of protection against CSRF by verifying the actual
origin of the request in addition to the CSRF token. We only do this check on
sites hosted behind HTTPS because only HTTPS sites have evidence to show that
the Referrer header is not being spuriously removed by random middleware
boxes.
|
|
|
|
configurable view deriver
|
|
|
|
|
|
This allows one to set up a logging configuration that is parameterized
based on variables specified on the command-line.
e.g.: the application .ini file could have:
```ini
[logger_root]
level = %(LOGGING_LOGGER_ROOT_LEVEL)s
handlers = console
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = %(LOGGING_HANDLER_CONSOLE_LEVEL)s
formatter = generic
```
This app could be launched with:
```
pserve development.ini LOGGING_LOGGER_ROOT_LEVEL=DEBUG LOGGING_HANDLER_CONSOLE_LEVEL=DEBUG
```
|
|
|
|
exposed a new IViewDeriver api with an optional ``options`` list
to expose support for new kwargs that may be passed to config.add_view
|
|
|
|
|
|
redux of #2013
|
|
This reverts commit 7410250313f893e5952bb2697324a4d4e3d47d22.
This reverts commit cbec33b898efffbfa6acaf91cae45ec0daed4d7a.
This reverts commit 345ca3052c395545b90fef9104a16eed5ab051a5, reversing
changes made to 47162533af84bb8d26db6d1c9ba1e63d70e9070f.
|
|
|
|
|
|
|
|
|
|
This exposes the QueryStringCacheBuster and PathSegmentCacheBuster
public APIs alongside the md5-variants. These should be more cleanly
subclassed by people wishing to extend their implementations.
|
|
|
|
|
|
|
|
|
|
|
|
Change autoclass to autoexception
|
|
Fixes #1388 or part thereof
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cleanup callback has a "request" parameter (and not "_")
cleanup callback know (since 1.5) if an exception occurred or not (to commit or rollback)
(same as #1302 on 1.5)
|