Skip to content

Handling trailing white space in backend_config.ini #1209

@MichaelTimbert

Description

@MichaelTimbert

Adding a trailing white space to a value in the backend_config.ini file may result in the following error message:

2025-03-17T12:22:06Z [80] [NOTICE] [Zonemaster::Backend::Config] Loading config: /etc/zonemaster/backend_config.ini
Error while loading /usr/local/bin/zonemaster_backend_rpcapi.psgi: File /etc/zonemaster/backend_config.ini: Invalid value for RPCAPI.enable_add_batch_job: yes

The error message is misleading: "Yes" is a valid value.

  • A simple solution is to add single quotes around the invalid value (e.g., "Invalid value for RPCAPI.enable_add_batch_job: 'yes ' ") to highlight trailing spaces.

  • Another solution is to remove trailing spaces when parsing the configuration file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions