Mark password as sensitive in logs
This commit is contained in:
parent
f1bae9f1eb
commit
42c01f241c
|
@ -61,6 +61,7 @@ module VagrantPlugins
|
||||||
def login(description: nil, code: nil)
|
def login(description: nil, code: nil)
|
||||||
@logger.info("Logging in '#{username_or_email}'")
|
@logger.info("Logging in '#{username_or_email}'")
|
||||||
|
|
||||||
|
Vagrant::Util::CredentialScrubber.sensitive(password)
|
||||||
response = post(
|
response = post(
|
||||||
"/api/v1/authenticate", {
|
"/api/v1/authenticate", {
|
||||||
user: {
|
user: {
|
||||||
|
@ -85,6 +86,7 @@ module VagrantPlugins
|
||||||
def request_code(delivery_method)
|
def request_code(delivery_method)
|
||||||
@env.ui.warn("Requesting 2FA code via #{delivery_method.upcase}...")
|
@env.ui.warn("Requesting 2FA code via #{delivery_method.upcase}...")
|
||||||
|
|
||||||
|
Vagrant::Util::CredentialScrubber.sensitive(password)
|
||||||
response = post(
|
response = post(
|
||||||
"/api/v1/two-factor/request-code", {
|
"/api/v1/two-factor/request-code", {
|
||||||
user: {
|
user: {
|
||||||
|
|
|
@ -76,7 +76,7 @@ describe VagrantPlugins::CloudCommand::Client do
|
||||||
}
|
}
|
||||||
|
|
||||||
let(:login) { "foo" }
|
let(:login) { "foo" }
|
||||||
let(:password) { "bar" }
|
let(:password) { "supersecretpassword" }
|
||||||
let(:description) { "Token description" }
|
let(:description) { "Token description" }
|
||||||
|
|
||||||
let(:headers) {
|
let(:headers) {
|
||||||
|
@ -182,7 +182,7 @@ describe VagrantPlugins::CloudCommand::Client do
|
||||||
}
|
}
|
||||||
|
|
||||||
let(:login) { "foo" }
|
let(:login) { "foo" }
|
||||||
let(:password) { "bar" }
|
let(:password) { "supersecretpassword" }
|
||||||
let(:delivery_method) { "sms" }
|
let(:delivery_method) { "sms" }
|
||||||
|
|
||||||
let(:headers) {
|
let(:headers) {
|
||||||
|
|
Loading…
Reference in New Issue