Steve Piercy
2018-03-18 90478fe4328ed465ecb63513905d26d8b8a2d069
Merge pull request #3245 from stevepiercy/1.9-branch

Fix secret length in doc of SignedCookieSessionFactory
1 files modified
10 ■■■■ changed files
pyramid/session.py 10 ●●●● patch | view | raw | blame | history
pyramid/session.py
@@ -141,7 +141,7 @@
    ):
    """
    .. 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 @@
        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 @@
    class SerializerWrapper(object):
        def __init__(self, secret):
            self.secret = secret
        def loads(self, bstruct):
            return signed_deserialize(bstruct, secret)
@@ -500,7 +500,7 @@
    ):
    """
    .. 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 @@
    ``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`).