dvc
dvc copied to clipboard
config: limit section names(e.g. remote) to alpha-numeric
~~https://github.com/iterative/dvc/pull/2012#discussion_r290092102~~ See https://github.com/iterative/dvc/blob/master/dvc/config.py .
We could adopt what git does:
The file consists of sections and variables. A section begins with the name of the section in square brackets and continues until the next section begins. Section names are case-insensitive. Only alphanumeric characters, - and . are allowed in section names. Each variable must belong to some section, which means that there must be a section header before the first setting of a variable.
from https://git-scm.com/docs/git-config#_syntax
May also want to review the /doc/commands-reference/config doc to specify whatever format ends up being allowed for config option values 👽
stale
Reopening, still worth looking into.
Is this still relevant @efiop ? Would be happy to pick this up.
Hello, I'd like to take up this issue if this is still relevant @efiop . Could I get some advice on what would be a good place to start looking(new to oss and the project, so any help is greatly appreciated!).
Thanks for the interest, folks.
@MFreidank Sorry, missed your message 🙁
@Fletchersan All config-related logic is in https://github.com/iterative/dvc/blob/main/dvc/config.py , validation is happening in https://github.com/iterative/dvc/blob/8ea9d3edef146c239086a7aec3cec9ead1bd32a9/dvc/config.py#L383 so it is likely this validation might fit into the schema itself, but need to take a closer look.