Skip to content

[3.0 port] fix(bbb-web): use the SecureRandom helper for every generated value #26279 - #26342

Merged
antobinary merged 1 commit into
bigbluebutton:v3.0.x-developfrom
antobinary:fix-bbb-web-securerandom-helper-30
Nov 4, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:v3.0.x-developfrom
antobinary:fix-bbb-web-securerandom-helper-30

Conversation

@antobinary

Copy link
Copy Markdown
Member

Backport of #26279 to 3.0.

Details ## What

bbb-web already generates the user id, auth token and session token on join with the Util helper backed by SecureRandom. This routes the values it still drew from commons-lang3 RandomStringUtils through the same helper:

  • the session token of a join with existingUserID;
  • the learning dashboard access token;
  • the attendee and moderator passwords generated when create carries none;
  • the generated voice bridge number, through a new randomNumeric variant.

The commit is cherry-picked with -x and applies unchanged.

How to test

create without passwords or voiceBridge: the response still has generated passwords and a voice bridge number of the usual length. Joining and opening the learning dashboard work as before.

…igbluebutton#26279)

8457886 introduced Util.randomAlphanumeric, backed by SecureRandom,
for the user id, auth token and session token created on join. Four
values were still drawn from commons-lang3 RandomStringUtils: the
session token of a join with existingUserID, the learning dashboard
access token, the attendee and moderator passwords generated when create
carries none, and the generated telVoice number. Route them through the
same helper, with a randomNumeric variant for telVoice, and drop the
RandomStringUtils imports.

(cherry picked from commit a1c8a07)
@antobinary antobinary added this to the Release 3.0 milestone Oct 30, 2026
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 25e523aa-739c-45d1-9647-9495f6b6a296
Commits

Reviewing files that changed from the base of the PR and between c51bf90 and dc0318a.

Files selected for processing: 3
  • bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java
  • bbb-common-web/src/main/java/org/bigbluebutton/api/Util.java
  • bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Walkthrough

Util now provides shared methods for generating alphanumeric and numeric strings. ParamsProcessorUtil uses these methods for generated passwords, learning-dashboard access tokens, and telephone voice numbers. ApiController uses the alphanumeric method for existing-user session tokens. Existing input checks and generated string lengths remain unchanged.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: paultrudel

Merge Risk: Minimal · up to dc031

The random-generation updates appear mergeable after normal checks; no specific correctness or compatibility risk was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the main change: bbb-web now generates the remaining values with the SecureRandom-backed Util helper instead of commons-lang3 RandomStringUtils. The diff matches this. It also carries …
Description check Passed The description states that this is a backport of #26279 to 3.0. It lists the four places that moved off RandomStringUtils: the existingUserID session token, the learning dashboard access token, the g…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: bbb-web now generates the remaining values with the SecureRandom-backed Util helper instead of commons-lang3 RandomStringUtils. The diff matches this. It also carries the [3.0 port] prefix and the upstream PR number, which fit a backport. The title is 85 characters, a bit long, but it is specific and clear.

Full details: Description check

Explanation

The description states that this is a backport of #26279 to 3.0. It lists the four places that moved off RandomStringUtils: the existingUserID session token, the learning dashboard access token, the generated passwords, and the generated voice bridge number through a new randomNumeric variant. These match the raw summary of ParamsProcessorUtil, Util, and ApiController. It also gives test steps.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

@antobinary
antobinary merged commit 6757444 into bigbluebutton:v3.0.x-develop Nov 4, 2026
32 of 33 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.

1 participant