Skip to content

Keep signed caption URLs as GoDAM signed them, so captions load on orgs with signed delivery - #2342

Draft
elifvish wants to merge 1 commit into
developfrom
fix/signed-caption-track-urls
Draft

elifvish wants to merge 1 commit into
developfrom
fix/signed-caption-track-urls

Conversation

@elifvish

@elifvish elifvish commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

What this fixes

Since multi-language captions (#2174), the player appends rev=<revision> to each caption track's URL, so an edit gets past the CDN's 30-day cache. On an org with signed delivery that URL is signed, and the CDN refuses a parameter its token doesn't cover. Every caption track then answers 403 and no captions show.

Checked against the live dev zone with a URL signed by GoDAM: as signed, 206; with &rev=1 appended, 403.

Change

trackSrc() leaves a signed URL (token= or bcdn_token=) as it is. A signed URL is new with every signature anyway, so it doesn't need the cache-buster. Unsigned URLs still get rev.

Testing

  • npx jest assets/src/js/godam-player/managers/transcriptManager.test.js: 12 / 12.
  • New tests cover an unsigned URL (gets rev) and a signed one (left alone). The multi-track test now expects the signed URL unchanged.
  • To try it by hand, use an org with signed delivery and a video with an edited caption track: captions load instead of 403.

Each caption track's URL got its revision appended (rev=...), so an edit reaches
visitors past the CDN's 30-day cache. On an org with signed delivery the URL is
signed, and the CDN refuses a parameter its token doesn't cover: every such track
answered 403 and no captions showed. A signed URL is new with each signature anyway,
so it is left as it is; unsigned ones still get the revision.
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

🔍 WordPress Plugin Check Report

⚠️ Status: Passed with warnings

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
12 0 12

⚠️ Warnings (12)

📁 readme.txt (1 warning)
📍 Line 🔖 Check 💬 Message
0 mismatched_plugin_name Plugin name "GoDAM - Video Hosting for LMS & Online Courses" is different from the name declared in plugin header "GoDAM".
📁 assets/build/css/main.css (1 warning)
📍 Line 🔖 Check 💬 Message
0 EnqueuedStylesScope This style is being loaded in all contexts.
📁 assets/src/libs/analytics.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/11/05/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
📁 assets/build/js/main.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/11/05/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

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.

1 participant