Skip to content

[6.38] [r] Sanitize R package and repo names in TRInterface helpers#22202

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

[6.38] [r] Sanitize R package and repo names in TRInterface helpers#22202
guitargeek merged 1 commit into
root-project:v6-38-00-patchesfrom
root-project-bot:BP_6.38_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

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

Test Results

    19 files      19 suites   2d 23h 45m 25s ⏱️
 3 727 tests  3 726 ✅ 0 💤 1 ❌
69 083 runs  69 082 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 8ec606d.

@guitargeek guitargeek merged commit 28418f5 into root-project:v6-38-00-patches May 9, 2026
27 of 29 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