Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-paste-workaround into lp:launchpad.
Commit message: Remove workaround for AuthCookieSigner bug fixed in Paste 1.7.3. Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~cjwatson/launchpad/remove-paste-workaround/+merge/259613 The loggerhead session handler is working around a bug that was fixed in Paste 1.7.3: https://bitbucket.org/ianb/paste/diff/paste/auth/cookie.py?diff2=b762faaee8b7&at=default Launchpad has been on Paste 1.7.5.1 for two years, so we can safely drop this. -- Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-paste-workaround into lp:launchpad.
=== modified file 'lib/launchpad_loggerhead/session.py' --- lib/launchpad_loggerhead/session.py 2012-01-01 03:03:28 +0000 +++ lib/launchpad_loggerhead/session.py 2015-05-20 13:46:29 +0000 @@ -6,23 +6,7 @@ import pickle -from paste.auth.cookie import ( - AuthCookieHandler, - AuthCookieSigner, - ) - - -class MyAuthCookieSigner(AuthCookieSigner): - """Fix a bug in AuthCookieSigner.""" - - def sign(self, content): - # XXX 2008-01-13 Michael Hudson: paste.auth.cookie generates bogus - # cookies when the value is long: - # http://trac.pythonpaste.org/pythonpaste/ticket/257. This is fixed - # now, so when a new version is released and packaged we can remove - # this class. - r = AuthCookieSigner.sign(self, content) - return r.replace('\n', '') +from paste.auth.cookie import AuthCookieHandler class SessionHandler(object): @@ -46,8 +30,7 @@ """ self.application = application self.cookie_handler = AuthCookieHandler( - self._process, scanlist=[session_var], - signer=MyAuthCookieSigner(secret)) + self._process, scanlist=[session_var]) self.session_var = session_var def __call__(self, environ, start_response):
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

