Always use constants.SECRET_PLACEHOLDER
This commit is contained in:
+3
-3
@@ -21,8 +21,8 @@ exports = module.exports = {
|
||||
|
||||
var assert = require('assert'),
|
||||
async = require('async'),
|
||||
backups = require('../backups.js'),
|
||||
BoxError = require('../boxerror.js'),
|
||||
constants = require('../constants.js'),
|
||||
debug = require('debug')('box:storage/gcs'),
|
||||
EventEmitter = require('events'),
|
||||
GCS = require('@google-cloud/storage').Storage,
|
||||
@@ -254,10 +254,10 @@ function testConfig(apiConfig, callback) {
|
||||
}
|
||||
|
||||
function removePrivateFields(apiConfig) {
|
||||
apiConfig.credentials.private_key = backups.SECRET_PLACEHOLDER;
|
||||
apiConfig.credentials.private_key = constants.SECRET_PLACEHOLDER;
|
||||
return apiConfig;
|
||||
}
|
||||
|
||||
function injectPrivateFields(newConfig, currentConfig) {
|
||||
if (newConfig.credentials.private_key === backups.SECRET_PLACEHOLDER && currentConfig.credentials) newConfig.credentials.private_key = currentConfig.credentials.private_key;
|
||||
if (newConfig.credentials.private_key === constants.SECRET_PLACEHOLDER && currentConfig.credentials) newConfig.credentials.private_key = currentConfig.credentials.private_key;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user