mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Remove keys from session and inject Session class into Jinja (#1456)
* Closes #1362 * Reduces the session object to just an id, nonce, and security hash
This commit is contained in:
@@ -212,9 +212,8 @@ def test_dynamic_challenge_loses_value_properly():
|
||||
# We need to bypass rate-limiting so creating a fake user instead of logging in
|
||||
with client.session_transaction() as sess:
|
||||
sess["id"] = team_id
|
||||
sess["name"] = name
|
||||
sess["email"] = email
|
||||
sess["nonce"] = "fake-nonce"
|
||||
sess["hash"] = "fake-hash"
|
||||
|
||||
data = {"submission": "flag", "challenge_id": 1}
|
||||
|
||||
@@ -304,9 +303,8 @@ def test_dynamic_challenge_value_isnt_affected_by_hidden_users():
|
||||
# We need to bypass rate-limiting so creating a fake user instead of logging in
|
||||
with client.session_transaction() as sess:
|
||||
sess["id"] = team_id
|
||||
sess["name"] = name
|
||||
sess["email"] = email
|
||||
sess["nonce"] = "fake-nonce"
|
||||
sess["hash"] = "fake-hash"
|
||||
|
||||
data = {"submission": "flag", "challenge_id": 1}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user