Skip to content

Commit

Permalink
Fix exception when file upload happens during expired user session
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed Oct 31, 2024
1 parent 7d71616 commit 3448755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/globaleaks/handlers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def process_file_upload(self):
file_id = self.request.args[b'flowIdentifier'][0].decode()

if file_id not in self.state.TempUploadFiles:
if self.session.user_role == 'whistleblower':
if self.session and self.session.user_role == 'whistleblower':
State.RateLimitingTable.check(self.request.path + b'#' + self.session.user_id.encode(),
State.tenants[1].cache.threshold_attachments_per_hour_per_report)
State.RateLimitingTable.check(self.request.path + b'#' + self.request.client_ip.encode(),
Expand Down

0 comments on commit 3448755

Please sign in to comment.