Skip to content
Snippets Groups Projects
Commit 5332eeb4 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(npm): decrypt tokens < 50 chars

Closes #3184
parent 8a841a7c
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ function massageConfig(config) { ...@@ -22,7 +22,7 @@ function massageConfig(config) {
for (const [key, val] of Object.entries(config)) { for (const [key, val] of Object.entries(config)) {
if (allowedStrings.includes(key) && is.string(val)) { if (allowedStrings.includes(key) && is.string(val)) {
massagedConfig[key] = [val]; massagedConfig[key] = [val];
} else if (key === 'npmToken' && val && val.length < 30) { } else if (key === 'npmToken' && val && val.length < 50) {
massagedConfig.npmrc = `//registry.npmjs.org/:_authToken=${val}\n`; massagedConfig.npmrc = `//registry.npmjs.org/:_authToken=${val}\n`;
delete massagedConfig.npmToken; delete massagedConfig.npmToken;
} else if (is.array(val)) { } else if (is.array(val)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment