mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Fixing large ip solves (#307)
* Switching to using strings to store IP addresses because of the issues with storing them properly, Fixes #302, Fixes $306 * Only runs migrations when using a real database because SQlite is too inflexible to support migrations properly * Removes calls to the ip helper functions but they can remain in case someone needs them in a plugin.
This commit is contained in:
@@ -260,7 +260,7 @@ if __name__ == '__main__':
|
||||
chalid = random.randint(1, CHAL_AMOUNT)
|
||||
if chalid not in used:
|
||||
used.append(chalid)
|
||||
solve = Solves(chalid, x + 1, '127.0.0.1', gen_word())
|
||||
solve = Solves(x + 1, chalid, '127.0.0.1', gen_word())
|
||||
|
||||
new_base = random_date(base_time, base_time + datetime.timedelta(minutes=random.randint(30, 60)))
|
||||
solve.date = new_base
|
||||
@@ -293,7 +293,7 @@ if __name__ == '__main__':
|
||||
chalid = random.randint(1, CHAL_AMOUNT)
|
||||
if chalid not in used:
|
||||
used.append(chalid)
|
||||
wrong = WrongKeys(x + 1, chalid, gen_word())
|
||||
wrong = WrongKeys(x + 1, chalid, '127.0.0.1', gen_word())
|
||||
|
||||
new_base = random_date(base_time, base_time + datetime.timedelta(minutes=random.randint(30, 60)))
|
||||
wrong.date = new_base
|
||||
|
||||
Reference in New Issue
Block a user