use new signer and strip trailing base64 padding

feature/auth
Martin Zimmermann 10 years ago
parent 090c01bf8a
commit ea5aa0e80f

@ -48,8 +48,6 @@ from os.path import dirname, join
from argparse import ArgumentParser
from functools import partial, reduce
from itsdangerous import URLSafeTimedSerializer
from werkzeug.routing import Map, Rule, redirect
from werkzeug.exceptions import HTTPException, InternalServerError
@ -69,7 +67,7 @@ except ImportError:
from isso import cache, config, db, migrate, ext, queue, spam, views, wsgi
from isso.wsgi import origin, urlsplit
from isso.utils import http, JSONRequest, html, hash
from isso.utils import http, JSONRequest, html, hash, URLSafeTimedSerializer
from isso.ext.notifications import Stdout, SMTP

@ -123,4 +123,4 @@ class URLSafeTimedSerializer(TimedSerializer):
def dump_payload(self, obj):
json = super(TimedSerializer, self).dump_payload(obj)
return base64.b64encode(json)
return base64.b64encode(json).rstrip(b"=")

Loading…
Cancel
Save