Skip to content

Instantly share code, notes, and snippets.

@tobbez
Created October 16, 2013 18:49
Show Gist options
  • Save tobbez/7012776 to your computer and use it in GitHub Desktop.
Save tobbez/7012776 to your computer and use it in GitHub Desktop.
From 42d4cc728d6891b17eb515e229e7d90a8badf16d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Torbj=C3=B6rn=20L=C3=B6nnemark?= <tobbez@ryara.net>
Date: Wed, 16 Oct 2013 20:45:05 +0200
Subject: [PATCH] Fixed Signer.sign for Python 3
Closes #29
---
itsdangerous.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/itsdangerous.py b/itsdangerous.py
index e14055f..7bce4b1 100644
--- a/itsdangerous.py
+++ b/itsdangerous.py
@@ -350,7 +350,7 @@ class Signer(object):
def sign(self, value):
"""Signs the given string."""
- return value + want_bytes(self.sep) + self.get_signature(value)
+ return want_bytes(value) + want_bytes(self.sep) + self.get_signature(value)
def verify_signature(self, value, sig):
"""Verifies the signature for the given value."""
--
1.8.3.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment