Mark password as sensitive in logs

This commit is contained in:
Brian Cain 2018-09-14 10:24:34 -07:00
parent f1bae9f1eb
commit 42c01f241c
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
2 changed files with 4 additions and 2 deletions

View File

@ -61,6 +61,7 @@ module VagrantPlugins
def login(description: nil, code: nil)
@logger.info("Logging in '#{username_or_email}'")
Vagrant::Util::CredentialScrubber.sensitive(password)
response = post(
"/api/v1/authenticate", {
user: {
@ -85,6 +86,7 @@ module VagrantPlugins
def request_code(delivery_method)
@env.ui.warn("Requesting 2FA code via #{delivery_method.upcase}...")
Vagrant::Util::CredentialScrubber.sensitive(password)
response = post(
"/api/v1/two-factor/request-code", {
user: {

View File

@ -76,7 +76,7 @@ describe VagrantPlugins::CloudCommand::Client do
}
let(:login) { "foo" }
let(:password) { "bar" }
let(:password) { "supersecretpassword" }
let(:description) { "Token description" }
let(:headers) {
@ -182,7 +182,7 @@ describe VagrantPlugins::CloudCommand::Client do
}
let(:login) { "foo" }
let(:password) { "bar" }
let(:password) { "supersecretpassword" }
let(:delivery_method) { "sms" }
let(:headers) {