Fix: dont allow archive version for share links when one doesnt exist (#13163)

This commit is contained in:
shamoon
2026-07-19 20:54:58 +00:00
committed by GitHub
parent 2180b21c41
commit 4f6d9fa93f
2 changed files with 45 additions and 1 deletions
+2 -1
View File
@@ -4534,7 +4534,8 @@ class SharedLinkView(View):
return HttpResponseRedirect("/accounts/login/?sharelink_expired=1")
return serve_file(
doc=share_link.document,
use_archive=share_link.file_version == "archive",
use_archive=share_link.file_version == ShareLink.FileVersion.ARCHIVE
and share_link.document.has_archive_version,
disposition="inline",
)