Skip to content

Fix Windows path-separator leak in brand logo path resolution#378

Merged
cderv merged 1 commit into
mainfrom
bugfix/brand-logo-path-separator
Jul 7, 2026
Merged

Fix Windows path-separator leak in brand logo path resolution#378
cderv merged 1 commit into
mainfrom
bugfix/brand-logo-path-separator

Conversation

@cderv

@cderv cderv commented Jul 7, 2026

Copy link
Copy Markdown
Member

On Windows, BrandLogoResource::with_path_relative_to joined the base
directory with Path::join and converted via to_string_lossy, which
yields native backslash separators. Downstream consumers (and the
crate's own tests) expect forward-slash paths.

Same root-cause family as #340 (pampa's quarto_api path resolution):
also swaps Path::is_absolute() for quarto_util::is_rooted(), which is
has_root()-based and correct on wasm32 targets where is_absolute()
misfires.

with_path_relative_to joined the base directory with Path::join and
converted via to_string_lossy, which yields native backslash
separators on Windows. Same root-cause family as the fix in PR #340
(pampa's quarto_api path resolution): also swaps Path::is_absolute()
for quarto_util::is_rooted(), which is has_root()-based and correct
on wasm32 targets where is_absolute() misfires.
@posit-snyk-bot

posit-snyk-bot commented Jul 7, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv cderv merged commit 09a0382 into main Jul 7, 2026
8 checks passed
@cderv cderv deleted the bugfix/brand-logo-path-separator branch July 7, 2026 13:40
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.

2 participants