mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Merge Dev into Master (#591)
* Chals endpoint seperation (#572) * Separate the logic of ctftime and email confirmations and admin checking into decorators * Separate the chals endpoint into /chals and /chals/:id. Closes #552, #435. * Challenges are now loaded directly from the server before being displayed to the user. * Challenge modals now use `{{ description }}` instead of `{{ desc }}`. * 403 is now a more common status code and can indicate that a CTF has not begun or that you are not logged in. This is in addition to CSRF failures. * Update tests to new behavior * Fixing glitch if an entry chal or team id isn't defined * Markdown it (#574) * Replace Marked with Markdown-It * Update modal change (#576) * Switch update modals to use nunjucks instead of JS to load in data. * Fix previewing challenges after hitting the challenge update button. * Fix edit-files issue with an unnecessary request. * Fix solves button * Closes #592
This commit is contained in:
@@ -48,7 +48,8 @@ def test_verify_emails_config():
|
||||
assert r.status_code == 302
|
||||
|
||||
r = client.get('/chals')
|
||||
assert r.status_code == 403
|
||||
assert r.location == "http://localhost/confirm"
|
||||
assert r.status_code == 302
|
||||
|
||||
user = Teams.query.filter_by(id=2).first()
|
||||
user.verified = True
|
||||
@@ -90,7 +91,8 @@ def test_verify_and_view_unregistered():
|
||||
assert r.status_code == 302
|
||||
|
||||
r = client.get('/chals')
|
||||
assert r.status_code == 403
|
||||
assert r.location == "http://localhost/confirm"
|
||||
assert r.status_code == 302
|
||||
|
||||
user = Teams.query.filter_by(id=2).first()
|
||||
user.verified = True
|
||||
|
||||
Reference in New Issue
Block a user