mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
* Fixing #261 and improving Unicode in Python2 * Fixing PEP8 issues
This commit is contained in:
@@ -231,7 +231,7 @@ if __name__ == '__main__':
|
||||
for x in range(AMT_CHALS_WITH_FILES):
|
||||
chal = random.randint(1, CHAL_AMOUNT)
|
||||
filename = gen_file()
|
||||
md5hash = hashlib.md5(filename).hexdigest()
|
||||
md5hash = hashlib.md5(filename.encode('utf-8')).hexdigest()
|
||||
db.session.add(Files(chal, md5hash + '/' + filename))
|
||||
|
||||
db.session.commit()
|
||||
|
||||
Reference in New Issue
Block a user