Skip to content

[6.40] [r] Sanitize R package and repo names in TRInterface helpers#22201

Merged
guitargeek merged 1 commit into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22181
May 9, 2026
Merged

[6.40] [r] Sanitize R package and repo names in TRInterface helpers#22201
guitargeek merged 1 commit into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22181

Conversation

@root-project-bot
Copy link
Copy Markdown

Backport of #22181, requested by @guitargeek.

`TRInterface::IsInstalled`, `::Require`, and `::Install` built R source by
concatenating the caller-provided package name into a string literal and
passing it to the embedded R interpreter.

Validate pkg against CRAN's package-name rule (starts with an ASCII
letter, only letters, digits, and dots, does not end in a dot) before
putting it into the R command, and emit an Error and return `kFALSE` on
any other input.

The `repos` argument of Install is validated to be a valid URL.

(cherry picked from commit 12173d5)
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Test Results

    22 files      22 suites   3d 10h 19m 49s ⏱️
 3 849 tests  3 849 ✅ 0 💤 0 ❌
76 022 runs  76 022 ✅ 0 💤 0 ❌

Results for commit 62387a4.

@guitargeek guitargeek merged commit 96d32ff into root-project:v6-40-00-patches May 9, 2026
31 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants