Skip to content

Commit 4c1d46b

Browse files
authored
Merge pull request #57 from canni/py3_fix
[py3 compat] Correctly handle bytes
2 parents 624f956 + 2312d70 commit 4c1d46b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

djangosaml2/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def login(request,
204204
http_response = render(request, post_binding_form_template, {
205205
'target_url': location,
206206
'params': {
207-
'SAMLRequest': base64.b64encode(request_xml),
207+
'SAMLRequest': base64.b64encode(binary_type(request_xml)),
208208
'RelayState': came_from,
209209
},
210210
})

0 commit comments

Comments
 (0)