Skip to content

Support opting out of octal number interpretation (like "0444"); add YAMLReadFeature.PARSE_OCTAL_NUMBERS #276

@davidxia

Description

@davidxia

Is there a way to disable the various numeric base literal support added by this commit? We have K8s YAML like the below.

      - name: test-service-account
        secret:
          secretName: test-secrets
          defaultMode: 0444

Version < 2.12.0 parsed defaultMode into an IntNode with value 444. Versions >= 2.12.0 parse into an IntNode with decimal value 292 (0444 is 292 in octal). We're using this library in an internal tool in a large company. A quick code search yields ~2K instances of just defaultMode: 0444.

If there isn't a way to disable this behavior, perhaps consider this a feature request or bug fix (depends on if you view this minor semantic version change as accidentally including a breaking change) to support a config knob to opt out of this behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    yamlIssue related to YAML format backend

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions