Skip to content

Fix missing [web] section header in mcbot.conf.example - #6

Merged
sg merged 1 commit into
mainfrom
fix/web-section-header
Jun 11, 2026
Merged

sg merged 1 commit into
mainfrom
fix/web-section-header

Conversation

@sg

@sg sg commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Problem

mcbot.conf.example lost its [web] section header (a merge casualty of the [env] and repeat-tracking changes landing together). As a result, the entire web block — enabled, host, port, api_tokens, admin_user, admin_password_hash, session_secret, cors_origins, tls_cert, tls_key — was nested under [env].

For anyone copying the example to mcbot.conf:

  • the web admin UI/API would stay silently disabled (load_config only reads settings under has_section("web")), and
  • those web keys would be swept up by the [env] handler and pushed into the process environment as junk vars (ENABLED, HOST, PORT, …).

Fix

Restore the [web] header between the [env] examples and the web settings. One line (plus a blank line for spacing); comments-only example, no behavior change beyond correct section attribution.

Verification

configparser now reports sections […, env, web, channels]; [web] contains enabled/host/port/…, and no web keys leak into [env]:

sections: ['radio', 'storage', 'channel_logging', 'logging', 'bot', 'env', 'web', 'channels']
[web] has enabled/host/port: True
[env] keys: []

🤖 Generated with Claude Code

The [web] section header was dropped (a merge casualty of the [env] and
repeat-tracking changes), so every web setting (enabled/host/port/
api_tokens/admin_*/session_secret/cors_origins/tls_*) was nested under
[env]. A user copying the example to mcbot.conf would get the web server
silently disabled (load_config looks for has_section("web")) and those
keys pushed into the process environment as junk env vars (ENABLED, HOST,
PORT, ...). Restore the header so the web keys live under [web] again.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sg
sg merged commit dbb46fb into main Jun 11, 2026
1 check passed
@sg
sg deleted the fix/web-section-header branch June 11, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant