* [2.7] escape default prompt detection in telnet action plugin (#46573)
This change fixes an issue with the default prompt handling. The value
needs to be escaped otherwise it does not work when converted to bytes.
(cherry picked from commit 9180d2c
)
Co-authored-by: Peter Sprygada <privateip@users.noreply.github.com>
* Add changelog
This commit is contained in:
parent
a9128b9fb0
commit
18f07e828e
2 changed files with 5 additions and 1 deletions
4
changelogs/fragments/telent-prompt-fix.yaml
Normal file
4
changelogs/fragments/telent-prompt-fix.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
bugfixes:
|
||||
- Fix an issue with the default telnet prompt handling. The value needs to be
|
||||
escaped otherwise it does not work when converted to bytes.
|
|
@ -51,7 +51,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
login_prompt = self._task.args.get('login_prompt', "login: ")
|
||||
password_prompt = self._task.args.get('password_prompt', "Password: ")
|
||||
prompts = self._task.args.get('prompts', ["$ "])
|
||||
prompts = self._task.args.get('prompts', ["\\$ "])
|
||||
commands = self._task.args.get('command') or self._task.args.get('commands')
|
||||
|
||||
if isinstance(commands, text_type):
|
||||
|
|
Loading…
Reference in a new issue