Skip to content

fix: Catch multi percent encode - #204

Merged
PhilippeWeidmann merged 1 commit into
masterfrom
fix/path-sanitizer
Aug 6, 2026
Merged

PhilippeWeidmann merged 1 commit into
masterfrom
fix/path-sanitizer

Conversation

@PhilippeWeidmann

Copy link
Copy Markdown
Member

No description provided.

Copilot AI balanced review requested due to automatic review settings August 5, 2026 14:03

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.

🟡 Changes recommended

Triple-percent-encoded traversal can still bypass the new validation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Updates safe path extraction to reject double-percent-encoded traversal and control characters.

Changes:

  • Validates separators and control characters after URL decoding.
  • Adds regression tests for double-encoded traversal and controls.
File summaries
File Description
Sources/InfomaniakCore/Extensions/String+Extension.swift Strengthens decoded path-component validation.
Tests/InfomaniakCoreTests/Extensions/UTString+SafePath.swift Adds encoded traversal and control-character tests.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

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.

🟢 Ready to approve

The focused validation change correctly addresses the encoded-separator bypass and is supported by relevant regression tests.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

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.

🟢 Ready to approve

The bounded validation closes the nested-encoding bypass and is covered by focused regression tests.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@adrien-coye adrien-coye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@PhilippeWeidmann
PhilippeWeidmann merged commit 0430ec9 into master Aug 6, 2026
12 checks passed
@PhilippeWeidmann
PhilippeWeidmann deleted the fix/path-sanitizer branch August 6, 2026 08:38
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.

3 participants