Skip to content

Disallow presigned urls based on cache headers #469 - #763

Merged
brendanheywood merged 1 commit into
MOODLE_404_STABLEfrom
469-presigned-cache
Sep 2, 2026
Merged

Disallow presigned urls based on cache headers #469#763
brendanheywood merged 1 commit into
MOODLE_404_STABLEfrom
469-presigned-cache

Conversation

@bwalkerl

@bwalkerl bwalkerl commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Test instructions:

  1. Setup objectfs and enable Pre-Signed URLs.
  2. Upload a file with https://github.com/catalyst/moodle-tool_publicfiles or find any other immutable public files.
  3. Start by enabling the setting and confirm Pre-Signing is used on the file (partly to confirm Pre-Signing is working)
  4. Disable the new setting
  5. Open dev tools and disable caching as the Pre-Signed URL will still likely be cached.
  6. With dev tools still open load the file and confirm the file isn't redirected to the Pre-Signed URL.

Closes #469

@bwalkerl
bwalkerl force-pushed the 469-presigned-cache branch from b24f263 to d46f628 Compare August 18, 2026 00:16
@bwalkerl
bwalkerl force-pushed the 469-presigned-cache branch from d46f628 to 3b797ad Compare August 26, 2026 05:54
Comment thread classes/local/store/object_file_system.php Outdated
@bwalkerl
bwalkerl force-pushed the 469-presigned-cache branch from 3b797ad to 043ea8b Compare August 31, 2026 23:46
Comment thread settings.php Outdated
Comment thread classes/local/store/object_file_system.php Outdated
Comment thread tests/object_file_system_test.php Outdated
@bwalkerl
bwalkerl force-pushed the 469-presigned-cache branch 2 times, most recently from 3b7c584 to b16c3dd Compare September 1, 2026 07:11
@bwalkerl bwalkerl changed the title Add setting to disallow presigned urls based on cache headers #469 Disallow presigned urls based on cache headers #469 Sep 1, 2026
@bwalkerl
bwalkerl force-pushed the 469-presigned-cache branch from b16c3dd to eb9bba1 Compare September 2, 2026 02:30
@brendanheywood
brendanheywood merged commit 71c8fbe into MOODLE_404_STABLE Sep 2, 2026
31 checks passed
@brendanheywood
brendanheywood deleted the 469-presigned-cache branch September 2, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Have an option to not sign cache control immutable / public files

3 participants