ergochat / ergo

A modern IRC server (daemon/ircd) written in Go.
https://ergo.chat/
MIT License
2.2k stars 175 forks source link

environment override variables are printed to stderr #2129

Closed slingamn closed 4 months ago

slingamn commented 4 months ago

Reported by eta in #ergo. This almost seems like a debugging print that got left in the release:

https://github.com/ergochat/ergo/blob/c67835ce5c5547df36476adfe18850ff75f4c332/irc/config.go#L1129-L1131

We can't log at level debug because we don't have the actual logger yet. Let's print the variable name but not the value.

slingamn commented 4 months ago

Incidentally, an envvar override with an invalid format will panic

https://github.com/ergochat/ergo/blob/c67835ce5c5547df36476adfe18850ff75f4c332/irc/config.go#L1047-L1048

(never mind, I forgot how os.Environ works)