Skip to content

Reject backslashes in Defaults List paths #3362

Closed

Description

@omry

Problem

Hydra uses / as the config-group separator in Defaults List paths, but backslashes are not explicitly rejected.

This creates platform-dependent behavior. FileConfigSource passes paths through operating-system path handling, so Windows can interpret \ as a filesystem separator while POSIX and ConfigStore treat it as a literal character. A path such as ..\secret can also bypass validation that checks parent-traversal segments by splitting only on /.

Expected behavior

Reject \ in Defaults List config group and option paths, including values produced by interpolation, with a clear error directing users to use /.

Do not normalize \ into /; / should remain Hydra's only supported config-group separator.

Add platform-independent validation tests covering ordinary backslash separators and ..\ traversal.

Related to #3202 and discovered while reviewing #3350.

Activity

  1. added this to the Hydra 1.4.0 milestone on Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions