Skip to content

Commit

Permalink
package: remove colors module
Browse files Browse the repository at this point in the history
  • Loading branch information
billchurch committed May 19, 2022
1 parent 8aebdc5 commit 78dafeb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
14 changes: 0 additions & 14 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 1 addition & 6 deletions app/server/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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;
Expand Down

0 comments on commit 78dafeb

Please sign in to comment.