Skip to content

[MINOR] §4: getenv() called during NatsConfig constructor initialization #522

@mvillmow

Description

@mvillmow

Finding

Severity: MINOR
Section: 4
Evidence: src/transport/nats_connection.cpp:83-98 (NatsTlsConfig::validate called from NatsConfig constructor)
Principle: KISS

NatsConfig's default constructor calls tls.validate(), which calls getenv() to read environment variables during object construction. This is called at object construction time, not lazily at connection time, which means the environment is read even when TLS is disabled and no connection is being made.


Part of #504

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions