Commit 5632b06e authored by Daniel W Bond's avatar Daniel W Bond

added uppercase ascii letters to the variety of characters that could appear...

added uppercase ascii letters to the variety of characters that could appear in urls, but removed visually similar characters from appearing
parent 5391518f
Pipeline #2306 failed with stages
in 2 minutes and 15 seconds
......@@ -19,8 +19,21 @@ from django.utils import timezone
from hashids import Hashids # http://hashids.org/python/
# generate the salt and initialize Hashids
# note: the Hashids library already implements several restrictions
# on character placement, including repeating or incrementing numbers,
# or placing curse word characters adjacent to one another
similar_chars = set(['b', 'G', 6,
'g', 'q',
'l', '1', 'I',
'S', '5',
'O', '0',])
alphanumerics = set(string.ascii_letters + string.digits)
link_chars = alphanumerics - similar_chars
HASHIDS = Hashids(
salt="srct.gmu.edu", alphabet=(string.ascii_lowercase + string.digits)
salt="srct.gmu.edu", alphabet=(link_chars)
)
class RegisteredUser(models.Model):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment