Skip to content

fix(presentation): authenticate thumbnail URL in manage presentations - #25241

Merged
antobinary merged 1 commit into
bigbluebutton:v4.0.x-developfrom
imdt-claudiop:fix/25163-thumbnail-auth
Jun 10, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:v4.0.x-developfrom
imdt-claudiop:fix/25163-thumbnail-auth

Conversation

@Tainan404

Copy link
Copy Markdown
Member

What does this PR do?

Presentation thumbnails in the Manage presentations panel fail to load on 4.0 — they render as broken images and the console logs 401 (Unauthorized) for the thumbnail requests.

Since #25020, presentation resource URLs (svg/png/thumbnail) require a sessionToken in the query string. The client adds it via Auth.authenticateURL(), which is why slides render fine — but the Manage-presentations thumbnail was the one spot still using the raw URL straight from GraphQL, so its request got rejected.

The fix authenticates the thumbnail URL the same way the slide path already does:

<img src={Auth.authenticateURL(firstPageThumbnailUrl)} alt={item.name} />

One client-side line, no backend change. authenticateURL is idempotent (won't duplicate an existing token) and the surrounding guard guarantees the URL is non-empty.

Closes Issue(s)

Closes #25163

How to test

  1. Join a meeting as a presenter.
  2. Open the media area → Manage presentations.
  3. The thumbnail should render (not a broken image), the network/console should show no 401 for /bigbluebutton/presentation/.../thumbnail/..., and the thumbnail URL should carry &sessionToken=....

Covered by a new Playwright test (Presentation thumbnail loads) that opens the panel and asserts the thumbnail URL has the session token and the image actually loads (naturalWidth > 0).

Validated on BBB 4.0.0-beta.3 (only this one-line client change between runs):

Before After
Thumbnail request 401 Unauthorized 200 OK
Thumbnail URL ?pageToken=... ?pageToken=...&sessionToken=...
Rendered image broken (naturalWidth = 0) loads (naturalWidth = 150)

Before (401, broken):

Before

After (200, loads):

After

More

  • Added/updated documentation

Presentation resource URLs are built with only a pageToken. Since bigbluebutton#25020
the server also requires a sessionToken in the query string and returns
401 before checking anything else. The slide path already appends it via
Auth.authenticateURL, but the media-sharing presentation thumbnail used
the raw URL straight from GraphQL, so its request was rejected with 401
and the thumbnail never loaded.

Authenticate the thumbnail URL with the same helper (idempotent, does not
duplicate an existing token). Adds a Playwright test that opens the manage
presentations panel and asserts the thumbnail carries the session token
and actually loads (naturalWidth > 0).

Fixes bigbluebutton#25163

Co-authored-by: Tainan Felipe <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 86a5a989-4e6f-410e-8e50-71c715064dfa

📥 Commits

Reviewing files that changed from the base of the PR and between 977c8b6 and 2ad4f93.

📒 Files selected for processing (3)
  • bigbluebutton-html5/imports/ui/components/actions-bar/media-area/media-sharing/presentation/component.jsx
  • bigbluebutton-tests/playwright/presentation/presentation.spec.ts
  • bigbluebutton-tests/playwright/presentation/presentation.ts

Walkthrough

This PR fixes presentation thumbnail loading in BBB 4.0 by wrapping thumbnail URLs with authentication. The component now imports the Auth service and applies Auth.authenticateURL() to the thumbnail image source, ensuring requests include a session token parameter for authorization. Two new test cases validate that thumbnails load with valid tokens and complete successfully.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • ramonlsouza
  • antobinary
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: authenticating the thumbnail URL in the manage presentations component to fix 401 unauthorized errors.
Description check ✅ Passed The description thoroughly explains the bug, root cause, solution, test approach, and validation results directly related to the changeset.
Linked Issues check ✅ Passed The PR successfully addresses issue #25163 by authenticating thumbnail URLs to restore loading functionality, adding a test to verify the fix, and validating that requests return 200 OK with the required sessionToken.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the thumbnail authentication issue: component fix, test case, and test helper—with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@ramonlsouza ramonlsouza added this to the Release 4.0 milestone Jun 8, 2026

@ramonlsouza ramonlsouza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested on local setup, LGTM!

@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

@antobinary
antobinary merged commit 8768637 into bigbluebutton:v4.0.x-develop Jun 10, 2026
130 of 170 checks passed
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.

4 participants