diff options
| author | Hong Yuan <hongyuan@homemaster.cn> | 2018-03-16 09:20:01 +0800 |
|---|---|---|
| committer | Hong Yuan <hongyuan@homemaster.cn> | 2018-03-16 09:20:01 +0800 |
| commit | 13734ad645514e28236a200b12c72756ea491477 (patch) | |
| tree | b2e95d4416fa245ae11f1b99daf5eeb8ec418343 | |
| parent | 47ff29297c65ae2c8da06a5bb2f361f806681ced (diff) | |
| download | pyramid-13734ad645514e28236a200b12c72756ea491477.tar.gz pyramid-13734ad645514e28236a200b12c72756ea491477.tar.bz2 pyramid-13734ad645514e28236a200b12c72756ea491477.zip | |
Fix secret length in doc of SignedCookieSessionFactory
| -rw-r--r-- | pyramid/session.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pyramid/session.py b/pyramid/session.py index 33119343b..4a9c8c100 100644 --- a/pyramid/session.py +++ b/pyramid/session.py @@ -141,7 +141,7 @@ def BaseCookieSessionFactory( ): """ .. versionadded:: 1.5 - + Configure a :term:`session factory` which will provide cookie-based sessions. The return value of this function is a :term:`session factory`, which may be provided as the ``session_factory`` argument of a @@ -393,7 +393,7 @@ def UnencryptedCookieSessionFactoryConfig( compatible with cookies generated using ``UnencryptedCookieSessionFactory``, so existing user session data will be destroyed if you switch to it. - + Configure a :term:`session factory` which will provide unencrypted (but signed) cookie-based sessions. The return value of this function is a :term:`session factory`, which may be provided as @@ -452,7 +452,7 @@ def UnencryptedCookieSessionFactoryConfig( class SerializerWrapper(object): def __init__(self, secret): self.secret = secret - + def loads(self, bstruct): return signed_deserialize(bstruct, secret) @@ -500,7 +500,7 @@ def SignedCookieSessionFactory( ): """ .. versionadded:: 1.5 - + Configure a :term:`session factory` which will provide signed cookie-based sessions. The return value of this function is a :term:`session factory`, which may be provided as @@ -519,7 +519,7 @@ def SignedCookieSessionFactory( ``secret`` A string which is used to sign the cookie. The secret should be at least as long as the block size of the selected hash algorithm. For - ``sha512`` this would mean a 128 bit (64 character) secret. It should + ``sha512`` this would mean a 512 bit (64 character) secret. It should be unique within the set of secret values provided to Pyramid for its various subsystems (see :ref:`admonishment_against_secret_sharing`). |
