Skip to content

Security: validate path-segment identifiers (path injection)#122

Merged
a-schild merged 1 commit into
mainfrom
fix/security-path-injection
Jul 24, 2026
Merged

Security: validate path-segment identifiers (path injection)#122
a-schild merged 1 commit into
mainfrom
fix/security-path-injection

Conversation

@a-schild

Copy link
Copy Markdown
Owner

Addresses the low-severity path-injection finding from the security review.

URIBuilder.setPath percent-encodes every reserved character except /, so a user/group identifier containing a path separator could inject extra URL path segments (e.g. admin/../otheruser). Nextcloud identifiers cannot legitimately contain a separator.

Fix: a shared ConnectorCommon.requireValidPathSegment helper rejects / and \ (and null), applied to the identifiers used as URL path segments in ProvisionConnector (user/group operations) and GroupFolders (group names). ConfigConnector is intentionally left as-is since it exposes a deliberate app/key path-based API.

Adds ConnectorCommonTest; the integration suite (which uses valid ids) confirms no regression.

🤖 Generated with Claude Code

…tion

URIBuilder.setPath percent-encodes everything except '/', so a user or group
id containing a path separator could inject extra URL path segments. Nextcloud
identifiers cannot legitimately contain a separator, so reject '/' and '\' in
the identifiers used as path segments (ProvisionConnector user/group ops and
GroupFolders group names) via a shared requireValidPathSegment helper.

Adds ConnectorCommonTest for the helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@a-schild
a-schild merged commit 58b9863 into main Jul 24, 2026
1 check passed
@a-schild
a-schild deleted the fix/security-path-injection branch July 24, 2026 13:36
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.

1 participant