chore: modify webssh2 debug keyword
This commit is contained in:
parent
df2a896139
commit
6aca5b414f
3 changed files with 23 additions and 6 deletions
12
ChangeLog.md
12
ChangeLog.md
|
@ -1,4 +1,16 @@
|
|||
# Change Log
|
||||
|
||||
## 0.5.0 [TBD]
|
||||
### BREAKING
|
||||
- Debug environment for webssh2 changed from `WebSSH2` to `webssh2`
|
||||
### Changes
|
||||
- Credentials are now retreived using passport.js (should make it easier to expand to other methods in the future) for #247
|
||||
- Refactored ./app/server/app.js
|
||||
- Safe shutdown feature moved to ./app/server/safeShutdown.js and re-worked
|
||||
- Session setup moved out of `/ssh/host` route into ./app/server/sessionSetup.js for readability and reuse for #247
|
||||
### Added
|
||||
- New route `/ssh/login/host` to gather `username` and `password` credentials from either GET or POST
|
||||
|
||||
## 0.4.0 [20210519]
|
||||
### BREAKING
|
||||
- Disabled ssh.serverlog.client option, this disables the POC which allowed for logging of the data sent between the client/server to the console.log.
|
||||
|
|
|
@ -17,7 +17,7 @@ console.log(`WebSSH2 service listening on ${config.listen.ip}:${config.listen.po
|
|||
server.on('error', (err) => {
|
||||
if (err.code === 'EADDRINUSE') {
|
||||
config.listen.port += 1;
|
||||
console.warn(`WebSSH2 Address in use, retrying on port ${config.listen.port}`);
|
||||
console.error(`WebSSH2 Address in use, retrying on port ${config.listen.port}`);
|
||||
setTimeout(() => {
|
||||
server.listen(config.listen.port);
|
||||
}, 250);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// eslint-disable-next-line import/order
|
||||
const config = require('./config');
|
||||
const path = require('path');
|
||||
const debug = require('debug')('WebSSH2');
|
||||
const debug = require('debug')('webssh2');
|
||||
|
||||
require('colors');
|
||||
// allow for color property extensions in log messages
|
||||
|
@ -42,6 +42,11 @@ passport.use(
|
|||
password: config.user.password,
|
||||
privatekey: config.user.privatekey,
|
||||
};
|
||||
debug(
|
||||
`overridebasic username: ${user.username.yellow.bold.underline} and password ${
|
||||
user.password ? 'exists'.yellow.bold.underline : 'is blank'.underline.red.bold
|
||||
}`
|
||||
);
|
||||
return done(null, user);
|
||||
}
|
||||
return done(null, false);
|
||||
|
@ -56,8 +61,8 @@ passport.use(
|
|||
password,
|
||||
};
|
||||
debug(
|
||||
`myAuth.name: ${username.yellow.bold.underline} and password ${
|
||||
password ? 'exists'.yellow.bold.underline : 'is blank'.underline.red.bold
|
||||
`HTTP Basic username: ${user.username.yellow.bold.underline} and password ${
|
||||
user.password ? 'exists'.yellow.bold.underline : 'is blank'.underline.red.bold
|
||||
}`
|
||||
);
|
||||
return done(null, user);
|
||||
|
@ -73,8 +78,8 @@ passport.use(
|
|||
password,
|
||||
};
|
||||
debug(
|
||||
`myAuth.name: ${username.yellow.bold.underline} and password ${
|
||||
password ? 'exists'.yellow.bold.underline : 'is blank'.underline.red.bold
|
||||
`HTTP GET/POST username: ${user.username.yellow.bold.underline} and password ${
|
||||
user.password ? 'exists'.yellow.bold.underline : 'is blank'.underline.red.bold
|
||||
}`
|
||||
);
|
||||
return done(null, user);
|
||||
|
|
Loading…
Reference in a new issue