Merge pull request #119 from billchurch/isuse118

Isuse118
This commit is contained in:
Bill Church 2018-11-21 12:04:07 -05:00 committed by GitHub
commit 3d244054c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,8 @@
# Change Log
## [0.2.8] TBD
### Changes
- Fixes issue if no password is entered, browser must be closed and restart to attempt to re-auth. See issue [#118](../../issues/118). Thanks @smilesm2 for the idea.
## [0.2.7] 2018-11-11
### Changes
- `config.reauth` was not respected if initial auth presented was incorrect, regardless of `reauth` setting in `config.json` reauth would always be attempted. fixes [#117](../../issues/117)

View file

@ -1,6 +1,6 @@
{
"name": "webssh2",
"version": "0.2.7",
"version": "0.2.8",
"ignore": [
".gitignore"
],

View file

@ -9,7 +9,7 @@ var Auth = require('basic-auth')
exports.basicAuth = function basicAuth (req, res, next) {
var myAuth = Auth(req)
if (myAuth) {
if (myAuth && myAuth.pass !== '') {
req.session.username = myAuth.name
req.session.userpassword = myAuth.pass
debug('myAuth.name: ' + myAuth.name.yellow.bold.underline +