Skip to content

Commit

Permalink
Added support for TOTP password prompts, as used by google-authentica…
Browse files Browse the repository at this point in the history
…tor-libpam
  • Loading branch information
mburz committed Jun 20, 2023
1 parent 330375b commit 9ffb309
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ v0.3.4.dev0

* :gh:issue:`929` Support Ansible 6 and ansible-core 2.13
* :gh:issue:`832` Fix runtime error when using the ansible.builtin.dnf module multiple times
* :gh:issue:`925` :class:`ansible_mitogen.connection.Connection` no longer tries to close the
* :gh:issue:`925` :class:`ansible_mitogen.connection.Connection` no longer tries to close the
connection on destruction. This is expected to reduce cases of `mitogen.core.Error: An attempt
was made to enqueue a message with a Broker that has already exitted`. However it may result in
resource leaks.
* :gh:issue:`659` Removed :mod:`mitogen.compat.simplejson`, not needed with Python 2.7+, contained Python 3.x syntax errors
* :gh:issue:`983` CI: Removed PyPI faulthandler requirement from tests
* :gh:issue:`998` SSH: Added support for TOTP password prompts (i.e. 'Verification code: '), as used by google-authenticator-libpam

v0.3.3 (2022-06-03)
-------------------
Expand Down
6 changes: 5 additions & 1 deletion mitogen/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@
)

# sshpass uses 'assword' because it doesn't lowercase the input.
# 'password': standard password prompt
# 'verification code': TOTP prompt(as used by e.g. google-authenticator-libpam)
# These should also match 'password & verification code' for password and TOTP
# prompt (as used by e.g. google-authenticator-libpam)
PASSWORD_PROMPT_PATTERN = re.compile(
b('password'),
b('(password|verification code)'),
re.I
)

Expand Down

0 comments on commit 9ffb309

Please sign in to comment.