mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-10 18:57:06 +00:00
🔒️(backend) derive connection-test room max age from token TTL
Refactor CONNECTION_TEST_ROOM_MAX_AGE_SECONDS so it is no longer an independent setting but a quantity derived from (or added on top of) the token TTL. This prevents a misconfiguration where the token would outlive the delete-room callback. In that case, an attacker holding a valid token could recreate the room after the callback fired and escape the intended cleanup.
This commit is contained in:
committed by
aleb_the_flash
parent
1328098c45
commit
b593516802
@@ -1612,9 +1612,13 @@ class DiagnosticsViewSet(viewsets.ViewSet):
|
||||
# eject someone who stays connected. Schedule a hard DeleteRoom when Celery
|
||||
# is available.
|
||||
if settings.CELERY_ENABLED:
|
||||
max_age = (
|
||||
settings.CONNECTION_TEST_TOKEN_TTL_SECONDS
|
||||
+ settings.CONNECTION_TEST_ROOM_EXTRA_AGE_SECONDS
|
||||
)
|
||||
delete_connection_test_room.apply_async(
|
||||
args=[room],
|
||||
countdown=settings.CONNECTION_TEST_ROOM_MAX_AGE_SECONDS,
|
||||
countdown=max_age,
|
||||
)
|
||||
|
||||
return drf_response.Response(
|
||||
|
||||
Reference in New Issue
Block a user