Skip to content

config overrides new section with a __DELETED__ value is added verbatim #1307

Description

@pellcorp

So this is unlikely to happen in real life but I have reproduced it.

So if a overrides / patches file has a section with a deleted value (__DELETED__), but the section does not exist at all in the target
file, the section including the key with the DELETED will be added verbatim, this should be fixed even if its unlikely to happen in the wild.

Below is a really simple example.

A printer.cfg:

[section]
key: value

A overrides.cfg:

[section2]
key: __DELETED__

Will result in a printer.cfg with:

[section]
key: value

[section2]
key: __DELETED__

What really should probably happen is if there are any keys in the overrides file where the value is __DELETED__, completely ignore that section.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions