Repository navigation
v0.5.3
Summary
Security and reliability patch release 0.5.3 for the supported 0.5 stable line. All 0.5.2 users should upgrade.
Security
- No passwords in container and image details. Passwords given as short options or inside shell scripts (for example
mysqld -p…,curl -u user:…,redis-cli -a …,sh -c '…') are masked, as are healthcheck output and container errors. Full command arguments and image build steps are shown only to admins in a private chat with the bot; everyone else sees just the program name. - 2FA stays private. The QR code and 2FA codes are handled only in a private chat with the bot. In a group, the bot replies with an Open private chat link; after confirming there, the action can be repeated in the group.
- A 2FA code can't be reused after a restart. Codes issued before the restart are refused, so you may need to wait for the next code (up to a minute).
- Webhook behind a reverse proxy: a forged
X-Forwarded-Forentry no longer passes as Telegram. Overly wide Telegram ranges and0.0.0.0/0trusted proxies are rejected. - Fewer image scanner findings: the Ubuntu base image's unused
pebblebinary, which bundled an outdated Go runtime, is no longer in the image.
Reliability
- The Docker healthcheck reflects the bot's real state. It used to report "healthy" no matter what; now a stuck or stopped bot shows up as unhealthy.
- Read-only containers work without extra settings. If the default state folder can't be written and
PYTMBOT_STATE_DIRisn't set, the bot keeps its small runtime files (health snapshot, 2FA replay protection, webhook bans) in a private/dev/shm/pytmbot-<uid>folder (not withipc: host). - The bot recovers from network problems at start-up instead of silently stopping, and exits with an error code when it stops because of a failure, so
restart: on-failurerestarts it. - Stop and Restart honour the configured grace period: new optional
docker.stop_timeoutanddocker.restart_timeout(1–300 s, 10 s by default). - Server screens say whether a number is for the whole host or only for the bot's container.
Upgrade notes
- Docker: pull
orenlab/pytmbot:0.5.3, or0.5/stableonce the release workflow has finished, and recreate the container. - Config version: set
config_version: "0.5.3"to match the running app version.0.5.2configs still load, and auto-migration handles the mismatch on startup. - Groups: admins who use the bot in groups confirm 2FA via the private-chat link.
- State directory: if you set
PYTMBOT_STATE_DIR, it must be writable; the healthcheck depends on it. - End of life:
0.5.2is end-of-life as of this release.
Full Changelog: v0.5.2...v0.5.3