fnp
/
django-cas-provider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1d9fdda
)
Use string.ascii_letters instead of string.letters in utils._generate_string to preve...
author
zuber
<marek@stepniowski.com>
Fri, 2 Oct 2009 21:41:40 +0000
(23:41 +0200)
committer
zuber
<marek@stepniowski.com>
Fri, 2 Oct 2009 21:41:40 +0000
(23:41 +0200)
cas_provider/utils.py
patch
|
blob
|
history
diff --git
a/cas_provider/utils.py
b/cas_provider/utils.py
index
3d64c16
..
04a5c12
100644
(file)
--- a/
cas_provider/utils.py
+++ b/
cas_provider/utils.py
@@
-3,9
+3,9
@@
import string
from models import ServiceTicket, LoginTicket
from models import ServiceTicket, LoginTicket
-def _generate_string(length=8, chars=string.letters + string.digits):
+def _generate_string(length=8, chars=string.
ascii_
letters + string.digits):
""" Generates a random string of the requested length. Used for creation of tickets. """
""" Generates a random string of the requested length. Used for creation of tickets. """
- return ''.join(Random().sample(
string.letters+string.digit
s, length))
+ return ''.join(Random().sample(
char
s, length))
def create_service_ticket(user, service):
""" Creates a new service ticket for the specified user and service.
def create_service_ticket(user, service):
""" Creates a new service ticket for the specified user and service.