Skip to content

fix(index): prefix leading-dash filepaths with ./ - #620

Merged
Fdawgs merged 1 commit into
mainfrom
fix/leading-dash
Aug 21, 2026
Merged

Fdawgs merged 1 commit into
mainfrom
fix/leading-dash

Conversation

@Fdawgs

@Fdawgs Fdawgs commented Aug 21, 2026 •

Copy link
Copy Markdown
Owner

A filepath that starts with - never converts, as UnRTF reads it as an option and has no -- terminator.
convert() now prefixes those paths with ./, which resolves to the same file.

Resolves CWE-88.

Checklist

Copilot AI lite review requested due to automatic review settings August 21, 2026 18:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review comments were supplied, and regression coverage is included.

Pull request overview

Fixes conversion of filepaths beginning with - by prefixing them with ./.

Changes:

  • Guards leading-dash paths before invoking UnRTF.
  • Adds regression coverage and a fixture.
  • Strengthens HTML output assertions.
File summaries
File Description
test/index.test.js Adds regression coverage and tighter output checks.
test/fixtures/-n.rtf Adds a leading-dash RTF fixture.
src/index.js Guards leading-dash filepath arguments.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Fdawgs
Fdawgs merged commit 654e09b into main Aug 21, 2026
18 checks passed
@Fdawgs
Fdawgs deleted the fix/leading-dash branch August 21, 2026 18:33
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