projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4f54e7
)
Ensure that names are utf-8 encoded in community auth
author
Magnus Hagander
<magnus@hagander.net>
Fri, 13 Jan 2012 08:56:32 +0000
(09:56 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Fri, 13 Jan 2012 08:56:32 +0000
(09:56 +0100)
If the name contains non-ascii characters, we could get an exception
when trying to urlencodethe resulting structure.
pgweb/account/views.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/account/views.py
b/pgweb/account/views.py
index 6e57a87dd73bc4782d882184d60cd6acfec48ab4..2626169f4d8e76a73b8ac633594701b8192a7621 100644
(file)
--- a/
pgweb/account/views.py
+++ b/
pgweb/account/views.py
@@
-230,10
+230,10
@@
def communityauth(request, siteid):
}, NavContext(request, 'account'))
info = {
- 'u': request.user.username,
- 'f': request.user.first_name,
- 'l': request.user.last_name,
- 'e': request.user.email,
+ 'u': request.user.username
.encode('utf-8')
,
+ 'f': request.user.first_name
.encode('utf-8')
,
+ 'l': request.user.last_name
.encode('utf-8')
,
+ 'e': request.user.email
.encode('utf-8')
,
}
if su:
info['su'] = request.GET['su']