Skip to content

Limit IBKR 2FA auto-fill submissions#43

Merged
Pigbibi merged 1 commit into
mainfrom
codex/limit-2fa-autofill-attempts
May 10, 2026
Merged

Limit IBKR 2FA auto-fill submissions#43
Pigbibi merged 1 commit into
mainfrom
codex/limit-2fa-autofill-attempts

Conversation

@Pigbibi
Copy link
Copy Markdown
Collaborator

@Pigbibi Pigbibi commented May 10, 2026

Summary

  • default the 2FA bot to one auto-fill submission per process
  • leave rejected/stuck auth windows for manual handling instead of repeatedly submitting TOTP codes
  • document the current Mobile Authenticator app device setting and the submission limit

Verification

  • python3 -m py_compile 2fa_bot.py
  • bash tests/test_docker_compose_ports.sh

@Pigbibi Pigbibi merged commit 04b43de into main May 10, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/limit-2fa-autofill-attempts branch May 10, 2026 19:03
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 487da1ee39

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread 2fa_bot.py
Comment on lines +70 to +74
try:
MAX_AUTOFILL_SUBMISSIONS = int(MAX_AUTOFILL_SUBMISSIONS_RAW)
except ValueError:
log.error("IBKR_2FA_MAX_SUBMISSIONS must be an integer")
sys.exit(1)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse max-submissions only when auto-fill is active

IBKR_2FA_MAX_SUBMISSIONS is parsed at import time, so the process exits on a non-integer value before validate_config() can honor IBKR_2FA_AUTOFILL=no. That changes the previous behavior where non-autofill mode skipped TOTP-related validation and still ran in monitor-only mode; with this commit, a malformed submission-limit env var can now prevent startup even when auto-fill is intentionally disabled.

Useful? React with 👍 / 👎.

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