Skip to content

tool_urlglob: make globbing error reported for correct position#21561

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/glob-error-position
Closed

tool_urlglob: make globbing error reported for correct position#21561
bagder wants to merge 1 commit into
masterfrom
bagder/glob-error-position

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented May 12, 2026

Reported by Codex Security

@bagder bagder marked this pull request as ready for review May 12, 2026 08:10
@bagder bagder requested a review from Copilot May 12, 2026 08:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts how the curl tool’s URL globbing parser tracks and reports error positions, so diagnostics point at the correct location in the input URL (per the reported issue).

Changes:

  • Report “unmatched brace” errors using the current parsing position instead of the opening-brace position.
  • When parsing a named glob ({<name>...} / [<name>...]), advance the tracked pos by the number of characters consumed by the name syntax so downstream error locations align with the real input offset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in 7eb0b30 May 12, 2026
@bagder bagder deleted the bagder/glob-error-position branch May 12, 2026 08:22
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants