Skip to content

impossible to parse when a token start with a decimal #1139

Description

@42atomys

What version were you using?

nats-server: v2.12.4

What environment was the server running in?

helm deployment on Kubernetes

Is this defect reproducible?

  1. Create a secret on Kubernetes cluster how start with a decimal (like 33feda22ea)
  2. Configure the environment from key and configuration like following
  3. Deploy helm
config:
  merge:
    authorization:
      token: << $TOKEN >>
container:
  env:
    TOKEN:
      valueFrom:
        secretKeyRef:
          name: secret-name
          key: TOKEN

Given the capability you are leveraging, describe your expectation?

always use string in parser to be sure nats start

Given the expectation, what is the defect you are observing?

This resume to an error on start of the nats server:

[43] 2026/03/06 15:15:40.083695 [ERR] Failed to reload server configuration: variable reference for
  'TOKEN' on line 3 could not be parsed: Parse error on line 1: 'Expected a top-level value to end with a
   new line, comment or EOF, but got '3' instead.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSuspected defect such as a bug or regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions