mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Improve Challenge type plugin staticmethods (#394)
This passes more logic into the challenge classes so that it can be accessed by plugins
This commit is contained in:
@@ -155,7 +155,9 @@ def test_submitting_flags_with_large_ips():
|
||||
ip_addresses = ['172.18.0.1', '255.255.255.255', '2001:0db8:85a3:0000:0000:8a2e:0370:7334']
|
||||
for ip_address in ip_addresses:
|
||||
# Monkeypatch get_ip
|
||||
utils.get_ip = lambda: ip_address
|
||||
def get_ip_fake(req=None):
|
||||
return ip_address
|
||||
utils.get_ip = get_ip_fake
|
||||
|
||||
# Generate challenge and flag
|
||||
chal = gen_challenge(app.db)
|
||||
|
||||
Reference in New Issue
Block a user