X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/blobdiff_plain/c4e951ccbda6275dd5134a431af7e0ee8f129feb..1f20c11056173d0b46b51b43beb4a2d66327e326:/cas_provider/utils.py?ds=inline diff --git a/cas_provider/utils.py b/cas_provider/utils.py index 3d64c16..04a5c12 100644 --- a/cas_provider/utils.py +++ b/cas_provider/utils.py @@ -3,9 +3,9 @@ import string 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. """ - return ''.join(Random().sample(string.letters+string.digits, length)) + return ''.join(Random().sample(chars, length)) def create_service_ticket(user, service): """ Creates a new service ticket for the specified user and service.