package: remove colors module
This commit is contained in:
parent
8aebdc54a5
commit
78dafebb2b
3 changed files with 1 additions and 21 deletions
14
app/package-lock.json
generated
14
app/package-lock.json
generated
|
@ -11,7 +11,6 @@
|
|||
"dependencies": {
|
||||
"basic-auth": "~2.0.1",
|
||||
"cidr-matcher": "^2.1.1",
|
||||
"colors": "~1.4.0",
|
||||
"debug": "^4.3.4",
|
||||
"express": "^4.18.1",
|
||||
"express-session": "^1.17.3",
|
||||
|
@ -1360,14 +1359,6 @@
|
|||
"integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/colors": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
|
||||
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
|
||||
"engines": {
|
||||
"node": ">=0.1.90"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
|
@ -8677,11 +8668,6 @@
|
|||
"integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==",
|
||||
"dev": true
|
||||
},
|
||||
"colors": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
|
||||
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA=="
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
"dependencies": {
|
||||
"basic-auth": "~2.0.1",
|
||||
"cidr-matcher": "^2.1.1",
|
||||
"colors": "~1.4.0",
|
||||
"debug": "^4.3.4",
|
||||
"express": "^4.18.1",
|
||||
"express-session": "^1.17.3",
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// util.js
|
||||
|
||||
// private
|
||||
require('colors'); // allow for color property extensions in log messages
|
||||
const debug = require('debug')('WebSSH2');
|
||||
const Auth = require('basic-auth');
|
||||
|
||||
|
@ -28,11 +27,7 @@ exports.basicAuth = function basicAuth(req, res, next) {
|
|||
if (myAuth && myAuth.pass !== '' && !defaultCredentials.overridebasic) {
|
||||
req.session.username = myAuth.name;
|
||||
req.session.userpassword = myAuth.pass;
|
||||
debug(
|
||||
`myAuth.name: ${myAuth.name.yellow.bold.underline} and password ${
|
||||
myAuth.pass ? 'exists'.yellow.bold.underline : 'is blank'.underline.red.bold
|
||||
}`
|
||||
);
|
||||
debug(`myAuth.name: ${myAuth.name} and password ${myAuth.pass ? 'exists' : 'is blank'}`);
|
||||
} else {
|
||||
req.session.username = defaultCredentials.username;
|
||||
req.session.userpassword = defaultCredentials.password;
|
||||
|
|
Loading…
Reference in a new issue