mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
docker_login: Hide password from response (#34491)
Fixes: #32869 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
a377302d6b
commit
4cc7af7372
1 changed files with 5 additions and 1 deletions
|
@ -124,7 +124,6 @@ login_results:
|
||||||
type: dict
|
type: dict
|
||||||
sample: {
|
sample: {
|
||||||
"email": "testuer@yahoo.com",
|
"email": "testuer@yahoo.com",
|
||||||
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
|
|
||||||
"serveraddress": "localhost:5000",
|
"serveraddress": "localhost:5000",
|
||||||
"username": "testuser"
|
"username": "testuser"
|
||||||
}
|
}
|
||||||
|
@ -190,6 +189,11 @@ class LoginManager(DockerBaseClass):
|
||||||
)
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
self.fail("Logging into %s for user %s failed - %s" % (self.registry_url, self.username, str(exc)))
|
self.fail("Logging into %s for user %s failed - %s" % (self.registry_url, self.username, str(exc)))
|
||||||
|
|
||||||
|
# If user is already logged in, then response contains password for user
|
||||||
|
# This returns correct password if user is logged in and wrong password is given.
|
||||||
|
if 'password' in response:
|
||||||
|
del response['password']
|
||||||
self.results['login_result'] = response
|
self.results['login_result'] = response
|
||||||
|
|
||||||
if not self.check_mode:
|
if not self.check_mode:
|
||||||
|
|
Loading…
Reference in a new issue