Repository navigation
fix(presentation): Require SessionToken and PageToken on Presentation Page Requests - #25020
Conversation
iteration: BBB 3.0.25 normal-priority
(WIP)iteration: BigBlueButton 3.0.26
This reverts commit 6ebc752.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds HMAC-based per-page tokens for presentation resources and integrates token generation, propagation, and verification across conversion, messaging, backend, nginx, and clients. Page tokens are produced during presentation conversion and included in Page/Slide models and generated URLs. Frontend wraps resource URLs with an authentication helper that appends sessionToken and pageToken. Nginx performs an auth_request to an internal controller endpoint which validates the session and verifies the page token before allowing access. Configuration and bean wiring for a pageTokenSecret are added, and controllers, services, and clients updated to enforce token and session checks. Sequence Diagram(s)sequenceDiagram
participant Client
participant Nginx
participant CheckAuth
participant PresentationController
participant Storage
Client->>Nginx: GET /presentation/slide.svg?sessionToken=...&pageToken=...
Nginx->>CheckAuth: auth_request (X-Original-URI)
CheckAuth->>PresentationController: checkPresentationAuthorization
PresentationController->>PresentationController: validateSession and verify HMAC token
PresentationController-->>CheckAuth: 200 or 401 or 403
Nginx->>Storage: proxy_pass resource if 200
Storage-->>Client: resource bytes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR hardens access to presentation assets by requiring a valid sessionToken for slide/page/download requests, and optionally enforcing a per-page HMAC (pageToken) to prevent guessing adjacent slide URLs. It also introduces a disabled feature (slidePreloading) that forces preloadNextSlides=0 so clients don’t receive “next slide” URLs/tokens until a slide is revealed.
Changes:
- Add Nginx
auth_requestgating for presentation slide assets and downloads, backed by a newPresentationController.checkPresentationAuthorizationendpoint. - Generate and validate per-page HMAC tokens (
pageToken) and propagate them through server messages and clients. - Add a
slidePreloadingdisabled feature that disables client-side next-slide prefetching.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| bigbluebutton-web/nginx-confs/presentation-slides.nginx | Adds auth_request to protect svg/pdf/thumbnail/textfiles slide asset routes served by Nginx. |
| bigbluebutton-web/grails-app/services/org/bigbluebutton/web/services/PresentationService.groovy | Adds pageTokenSecret injection point used to decide whether to enforce per-page tokens. |
| bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/UrlMappings.groovy | Exposes /bigbluebutton/presentation/checkAuthorization for Nginx auth_request. |
| bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy | Implements authorization check endpoint + enforces session/page token checks on fallback presentation endpoints. |
| bigbluebutton-web/grails-app/conf/spring/resources.xml | Wires pageTokenSecret into bbbWebApiGWApp and presentationService. |
| bigbluebutton-web/grails-app/conf/bigbluebutton.properties | Introduces pageTokenSecret config and injects into presentationService. |
| bigbluebutton-web/bbb-web.nginx | Protects download route with auth_request and adds internal /presentation/checkAuthorization proxy location. |
| bigbluebutton-html5/imports/ui/services/features/index.js | Formatting-only change (newline). |
| bigbluebutton-html5/imports/ui/components/whiteboard/container.jsx | Authenticates the whiteboard background SVG URL by appending sessionToken. |
| bigbluebutton-html5/imports/ui/components/presentation/container.jsx | Authenticates slide SVG URLs and download URIs; ensures preloaded slide fetches include sessionToken. |
| bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/message-content/presentation-content/component.tsx | Authenticates presentation download link URLs shown in chat. |
| bbb-learning-dashboard/src/components/StatusTable.jsx | Adds sessionToken + pageToken to slide/thumbnail URLs for protected access from the dashboard. |
| bbb-learning-dashboard/src/App.js | Passes sessionToken down to StatusTable (but currently introduces a modal state variable bug). |
| bbb-graphql-server/bbb_schema.sql | Formatting cleanup for update_preloadNextPages() trigger function. |
| bbb-common-web/src/main/scala/org/bigbluebutton/api2/MsgBuilder.scala | Generates per-page HMAC token, appends pageToken to slide URLs, and includes pageToken in page VOs. |
| bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala | Threads pageTokenSecret into MsgBuilder calls when publishing presentation conversion events. |
| bbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Presentation.scala | Extends PageVO / PresentationPageConvertedVO to carry pageToken. |
| akka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/LearningDashboardActor.scala | Persists pageToken alongside slide timeline entries for dashboard slide links. |
| akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/RunningMeeting.scala | Implements slidePreloading disabled feature by forcing preloadNextSlides=0 in client settings. |
| akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/PresentationPods.scala | Adds pageToken to the internal PresentationPage model. |
| akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationPodsApp.scala | Propagates pageToken when building outgoing presentation/page VOs. |
| akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationPageConvertedSysMsgHdlr.scala | Stores pageToken in meeting state when a page conversion event is handled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
bbb-learning-dashboard/src/components/StatusTable.jsx (1)
223-247:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAvoid emitting unauthenticated presentation URLs when tokens are missing.
On Line 226,
tokenParamsbecomes''when either token is absent, so Lines 239/246 still render raw presentation URLs. With token enforcement enabled, this causes failed thumbnail/link requests (notably whensessionTokenis empty in report-token flows). Gate rendering on both tokens (or render a non-clickable placeholder) instead of generating unauthenticated URLs.Suggested fix
const { presentationId, pageNum, pageToken, presentationName, } = slide || {}; - const tokenParams = pageToken && sessionToken + const hasAuthTokens = Boolean(pageToken && sessionToken); + const tokenParams = hasAuthTokens ? `?${new URLSearchParams({ pageToken, sessionToken })}` : ''; return ( <td @@ - { slide && ( + { slide && hasAuthTokens && ( <div className="flex"> <div className="my-4"> <a href={`${URLPrefix}/${presentationId}/svg/${pageNum}${tokenParams}`}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bbb-learning-dashboard/src/components/StatusTable.jsx` around lines 223 - 247, The current rendering builds unauthenticated URLs when tokenParams is empty; update the render logic in StatusTable.jsx (the cell that uses slide, tokenParams, URLPrefix, sessionToken) to require both pageToken and sessionToken before emitting link/img anchors: if either token is missing, do not construct clickable href/src—either render a non-clickable placeholder or a disabled thumbnail element with appropriate aria text. Locate the JSX that constructs tokenParams and the anchor/img blocks and gate those elements on (pageToken && sessionToken) instead of inserting an empty tokenParams string.bigbluebutton-html5/imports/ui/components/presentation/container.jsx (1)
199-218:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAlign cache keys for preloaded slides to fix inconsistent deduplication logic.
The code checks against a numeric key at line 200 (
fetchedSlide[currentSlide.num + PRELOAD_NEXT_SLIDE]) but only writes with a URL key at line 212 (fetchedSlide[slide.svgUrl]). The numeric key is never set, so the outer gate will always pass and re-enter the block on each render. The inner filter at line 207 prevents duplicate fetches, masking the issue, but the inconsistent keys indicate confused caching logic.Either set the numeric key when caching:
presentation.fetchedSlide[currentSlide.num + PRELOAD_NEXT_SLIDE] = true;Or use a single stable identifier throughout (e.g., a consistent slide ID rather than mixing numeric indices with authenticated URLs).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bigbluebutton-html5/imports/ui/components/presentation/container.jsx` around lines 199 - 218, The prefetch logic mixes numeric keys and URL keys for caching (check uses fetchedSlide[currentSlide.num + PRELOAD_NEXT_SLIDE] while writes use fetchedSlide[slide.svgUrl]), so align them: either set the numeric index key when you mark a slide fetched (presentation.fetchedSlide[currentSlide.num + PRELOAD_NEXT_SLIDE] = true) or, preferably, normalize to a single stable identifier (use the authenticated URL key everywhere) by changing the outer existence check to use the same Auth.authenticateURL(url)/slide.svgUrl lookup; update the references to PRELOAD_NEXT_SLIDE, currentSlide.num, fetchedSlide and slide.svgUrl so the check and the write use the identical key and remove the inconsistent mixed-key logic.bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy (2)
548-560:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
thumbnailis still authorized by session only.Unlike
showThumbnail/showSvgImage/showPng/showTextfile, this action never checks the meeting or a page token before reading fromconfDir(). Any valid session token can therefore authorize a guessed thumbnail path from another meeting.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy` around lines 548 - 560, The thumbnail action currently only calls validateSession() and then reads files from confDir() using params.id/params.thumb, allowing any valid session to access other meetings' thumbnails; update thumbnail to enforce the same meeting/page-token checks as the other endpoints (e.g. the logic used by showThumbnail/showSvgImage/showPng/showTextfile) before calling presentationService.showThumbnail(presDir, params.thumb): derive the meetingId (or use params.meetingId/pageToken) and verify it against userSession (or call the existing authorization helper used by those other actions) to reject requests that are not authorized for that meeting or valid page token. Ensure the check happens prior to building presDir or reading pres.readBytes().
567-587:⚠️ Potential issue | 🟠 Major | ⚡ Quick winThese XML listing endpoints still publish untokenized slide paths.
The payloads only expose sequential
slide/N,thumbnail/N,textfiles/N, andsvgs/Nnames, but the corresponding file handlers now reject requests withoutpageToken. Any client still consuming these responses will start getting 403s when page-token enforcement is enabled.Also applies to: 596-615, 624-643, 652-671
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy` around lines 567 - 587, The XML responses in numberOfSlides are emitting untokenized resource paths (slide/N, thumbnail/N, textfile/N, svgs/N) which will be rejected by handlers requiring pageToken; to fix, generate and embed a page token for each slide when building the XML: inside numberOfSlides (and the similar endpoints at 596-615, 624-643, 652-671) call a presentationService helper to get a token for each index (e.g., presentationService.getPageToken(conf, rm, presentationName, i) or equivalent) and append it to the slide, thumb, textfile and svg URLs (for example as a query param or tokenized path) so each slide element includes the required pageToken before rendering.
🧹 Nitpick comments (1)
bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala (1)
29-30: ⚡ Quick winConsider warning when
pageTokenSecretis blank.
pageTokenSecret: String = ""keeps the constructor optional, which is fine for tests / partial wiring. However, downstream the controller's check isif (presentationService.pageTokenSecret)(falsy on empty string in Groovy), so an explicitly-blankpageTokenSecretsilently disables per-page token verification and downgrades the new protection to session-only. The default inbigbluebutton.propertiescovers this, but a startuplog.warn(here or inPresentationService) when the value is empty would make accidental misconfiguration visible instead of failing open.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala` around lines 29 - 30, The constructor default pageTokenSecret = "" can silently disable per-page token checks because the controller uses if (presentationService.pageTokenSecret) (falsy for an empty string); add a startup warning when the secret is blank to surface misconfiguration: detect empty pageTokenSecret in the BbbWebApiGWApp initialization (or inside PresentationService constructor/init) and emit a log.warn describing that pageTokenSecret is empty and per-page token verification is disabled, referencing the pageTokenSecret field and PresentationService so reviewers can locate the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@bigbluebutton-html5/imports/ui/services/features/index.js`:
- Around line 160-162: Guard the access to the emoji picker config so missing
keys don't throw: change the EMOJI_PICKER_ENABLED assignment to safely read
window.meetingClientSettings.public.chat.emojiPicker.enable with optional
chaining or a safe getter and default to false (e.g. const EMOJI_PICKER_ENABLED
= window.meetingClientSettings?.public?.chat?.emojiPicker?.enable ?? false),
then keep the existing return that checks
useDisabledFeatures().indexOf('chatEmojiPicker') === -1 && EMOJI_PICKER_ENABLED;
this ensures emojiPicker is false when the config is absent.
In
`@bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy`:
- Around line 378-381: Reject non-numeric page identifiers before recomputing
the HMAC: in PresentationController (the code paths that compute expected =
generatePageToken(... Integer.parseInt(...), ...)) validate that params.slide /
params.thumb / params.png / params.textfile are numeric first (e.g. regex match
or Integer.tryParse pattern) and return a 403 (or 400) immediately if not
numeric, rather than calling Integer.parseInt which throws
NumberFormatException; apply the same guard to showThumbnail, showPng, and
showTextfile so malformed values never reach generatePageToken.
---
Outside diff comments:
In `@bbb-learning-dashboard/src/components/StatusTable.jsx`:
- Around line 223-247: The current rendering builds unauthenticated URLs when
tokenParams is empty; update the render logic in StatusTable.jsx (the cell that
uses slide, tokenParams, URLPrefix, sessionToken) to require both pageToken and
sessionToken before emitting link/img anchors: if either token is missing, do
not construct clickable href/src—either render a non-clickable placeholder or a
disabled thumbnail element with appropriate aria text. Locate the JSX that
constructs tokenParams and the anchor/img blocks and gate those elements on
(pageToken && sessionToken) instead of inserting an empty tokenParams string.
In `@bigbluebutton-html5/imports/ui/components/presentation/container.jsx`:
- Around line 199-218: The prefetch logic mixes numeric keys and URL keys for
caching (check uses fetchedSlide[currentSlide.num + PRELOAD_NEXT_SLIDE] while
writes use fetchedSlide[slide.svgUrl]), so align them: either set the numeric
index key when you mark a slide fetched
(presentation.fetchedSlide[currentSlide.num + PRELOAD_NEXT_SLIDE] = true) or,
preferably, normalize to a single stable identifier (use the authenticated URL
key everywhere) by changing the outer existence check to use the same
Auth.authenticateURL(url)/slide.svgUrl lookup; update the references to
PRELOAD_NEXT_SLIDE, currentSlide.num, fetchedSlide and slide.svgUrl so the check
and the write use the identical key and remove the inconsistent mixed-key logic.
In
`@bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy`:
- Around line 548-560: The thumbnail action currently only calls
validateSession() and then reads files from confDir() using
params.id/params.thumb, allowing any valid session to access other meetings'
thumbnails; update thumbnail to enforce the same meeting/page-token checks as
the other endpoints (e.g. the logic used by
showThumbnail/showSvgImage/showPng/showTextfile) before calling
presentationService.showThumbnail(presDir, params.thumb): derive the meetingId
(or use params.meetingId/pageToken) and verify it against userSession (or call
the existing authorization helper used by those other actions) to reject
requests that are not authorized for that meeting or valid page token. Ensure
the check happens prior to building presDir or reading pres.readBytes().
- Around line 567-587: The XML responses in numberOfSlides are emitting
untokenized resource paths (slide/N, thumbnail/N, textfile/N, svgs/N) which will
be rejected by handlers requiring pageToken; to fix, generate and embed a page
token for each slide when building the XML: inside numberOfSlides (and the
similar endpoints at 596-615, 624-643, 652-671) call a presentationService
helper to get a token for each index (e.g.,
presentationService.getPageToken(conf, rm, presentationName, i) or equivalent)
and append it to the slide, thumb, textfile and svg URLs (for example as a query
param or tokenized path) so each slide element includes the required pageToken
before rendering.
---
Nitpick comments:
In `@bbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scala`:
- Around line 29-30: The constructor default pageTokenSecret = "" can silently
disable per-page token checks because the controller uses if
(presentationService.pageTokenSecret) (falsy for an empty string); add a startup
warning when the secret is blank to surface misconfiguration: detect empty
pageTokenSecret in the BbbWebApiGWApp initialization (or inside
PresentationService constructor/init) and emit a log.warn describing that
pageTokenSecret is empty and per-page token verification is disabled,
referencing the pageTokenSecret field and PresentationService so reviewers can
locate the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6a46ccd8-e804-4c8c-bb7e-16e258ba52c6
📒 Files selected for processing (22)
akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationPageConvertedSysMsgHdlr.scalaakka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/presentationpod/PresentationPodsApp.scalaakka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/PresentationPods.scalaakka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/RunningMeeting.scalaakka-bbb-apps/src/main/scala/org/bigbluebutton/endpoint/redis/LearningDashboardActor.scalabbb-common-message/src/main/scala/org/bigbluebutton/common2/domain/Presentation.scalabbb-common-web/src/main/scala/org/bigbluebutton/api2/BbbWebApiGWApp.scalabbb-common-web/src/main/scala/org/bigbluebutton/api2/MsgBuilder.scalabbb-graphql-server/bbb_schema.sqlbbb-learning-dashboard/src/App.jsbbb-learning-dashboard/src/components/StatusTable.jsxbigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-list/page/chat-message/message-content/presentation-content/component.tsxbigbluebutton-html5/imports/ui/components/presentation/container.jsxbigbluebutton-html5/imports/ui/components/whiteboard/container.jsxbigbluebutton-html5/imports/ui/services/features/index.jsbigbluebutton-web/bbb-web.nginxbigbluebutton-web/grails-app/conf/bigbluebutton.propertiesbigbluebutton-web/grails-app/conf/spring/resources.xmlbigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/UrlMappings.groovybigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovybigbluebutton-web/grails-app/services/org/bigbluebutton/web/services/PresentationService.groovybigbluebutton-web/nginx-confs/presentation-slides.nginx
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy (1)
60-149: ⚖️ Poor tradeoffConsider letting nginx cache successful
auth_requestresponses.
Cache-Control: no-cacheis set unconditionally (lines 65, 76, even on the200 authorizedpaths). Combined withauth_requestinpresentation-slides.nginx, every SVG/thumbnail/textfile/PDF byte range fetched by every viewer will round-trip through this controller and re-execute session lookups + HMAC computation. For a slide deck with hundreds of pages and dozens of viewers this is a meaningful hot path.Since the
(sessionToken, presId, page)triple is stable for the lifetime of a session, you can let nginx cacheauth_requestresponses for a short TTL by emitting cache hints on the200branches and configuringauth_request_cache(orproxy_cachein front of the auth location) on the nginx side. The401/403branches should keepno-cacheto avoid sticky denials.If you'd rather not change behavior in this PR, this can be deferred — flagging as operational advice rather than blocking.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy` around lines 60 - 149, The controller unconditionally sets "Cache-Control: no-cache" which prevents nginx from caching successful auth_request responses; update checkPresentationAuthorization so it does not add the no-cache header globally—remove or move the response.addHeader("Cache-Control", "no-cache") call and instead add cache hints only on successful 200 branches (the blocks that set response.setStatus(200) and write 'authorized') e.g. set a short TTL like response.addHeader("Cache-Control", "public, max-age=60") there, while keeping the existing no-cache behavior on the 401/403 error branches; make changes inside the checkPresentationAuthorization method and adjust all three 200 paths (slideMatcher, downloadMatcher, pdfMatcher) where response.setStatus(200) is used.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy`:
- Line 66: The response content type is incorrectly set to 'plain/text' in
PresentationController (in the checkPresentationAuthorization endpoint and two
other spots); replace every occurrence of response.contentType = 'plain/text'
with response.contentType = 'text/plain' to use the correct MIME type (search
for the string 'plain/text' in PresentationController and update in the
checkPresentationAuthorization method and the other instances referenced).
---
Nitpick comments:
In
`@bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy`:
- Around line 60-149: The controller unconditionally sets "Cache-Control:
no-cache" which prevents nginx from caching successful auth_request responses;
update checkPresentationAuthorization so it does not add the no-cache header
globally—remove or move the response.addHeader("Cache-Control", "no-cache") call
and instead add cache hints only on successful 200 branches (the blocks that set
response.setStatus(200) and write 'authorized') e.g. set a short TTL like
response.addHeader("Cache-Control", "public, max-age=60") there, while keeping
the existing no-cache behavior on the 401/403 error branches; make changes
inside the checkPresentationAuthorization method and adjust all three 200 paths
(slideMatcher, downloadMatcher, pdfMatcher) where response.setStatus(200) is
used.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: cede18e1-cfc8-4b88-8245-ceee05d0e5e9
📒 Files selected for processing (1)
bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/PresentationController.groovy
…ine only (as now there are two occurrences)
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@build/packages-template/bbb-config/after-install.sh`:
- Line 80: The sed substitution for SECRET uses a greedy s/.*=// which strips
trailing base64 '=' padding; change it to remove only the key prefix (e.g. use
s/^[^=]*=// or use cut -d'=' -f2- on the securitySalt line) so SECRET correctly
captures the full base64 value from bigbluebutton.properties (securitySalt) and
prevents sharedSecret in application.conf from being set to an empty string.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 866d4ae3-89d9-4672-82dc-1435b9c5c37d
📒 Files selected for processing (1)
build/packages-template/bbb-config/after-install.sh
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…-idor-client-revised
…etween moderator and attendee pages
|
✅ Automated tests have passed! |
…#25241) Presentation resource URLs are built with only a pageToken. Since #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 #25163 Co-authored-by: Claudio Promptoso <[email protected]>



What does this PR do?
Adds session token authentication to Nginx and
PresentationControllerpresentation file requests to prevent users that are not part of the meeting that a presentation belongs to from accessing presentation files.Adds a new optional
pageTokenSecretparameter tobigbluebutton.propertiesthat defaults to the same value as thesecuritySalt. Setting this parameter will cause an HMAC signature to be generated for each presentation page and enables an additional layer of security on requests for presentation page files. When enabled, all requests for presentation page files will be required to supply the signature corresponding to the requested presentation page. The signatures are generated from the presentation ID, page number, andpresTokenSecret. Signatures are stored as part of the presentation URI in Postgres and are therefore accessible to the client through GraphQL mutations.Introduces a new disabled feature,
slidePreloading, that, when disabled, prevents users from being able to access slides that have not been revealed.Closes Issue(s)
Closes #11919