mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
realm_export: Restrict deletion to users in the same realm.
This fixes CVE-2025-30368. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
9b33e3bb14
commit
cce3c7ebb1
@@ -136,7 +136,7 @@ def get_realm_exports(request: HttpRequest, user: UserProfile) -> HttpResponse:
|
||||
@require_realm_admin
|
||||
def delete_realm_export(request: HttpRequest, user: UserProfile, export_id: int) -> HttpResponse:
|
||||
try:
|
||||
export_row = RealmExport.objects.get(id=export_id)
|
||||
export_row = RealmExport.objects.get(realm_id=user.realm_id, id=export_id)
|
||||
except RealmExport.DoesNotExist:
|
||||
raise JsonableError(_("Invalid data export ID"))
|
||||
|
||||
|
Reference in New Issue
Block a user