Skip to content

Commit 1a60663

Browse files
committed
Closes #182 and #183
1 parent 43b5a97 commit 1a60663

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Version 1.7.2, December 4th, 2016
2+
==================================
3+
4+
- Closes #183 (accessible document list)
5+
- Closes #182 (case insensitive test on SHA-1 passwords)
6+
- Reads Jingo version from packages.json (no manual edit for version bump)
7+
18
Version 1.7.1, November 5th, 2016
29
==================================
310

jingo

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Jingo, wiki engine
55
* http://github.com/claudioc/jingo
66
*
7-
* Copyright 2015 Claudio Cicali <claudio.cicali@gmail.com>
7+
* Copyright 2016 Claudio Cicali <claudio.cicali@gmail.com>
88
* Released under the MIT license
99
*/
1010
var program = require('commander')
@@ -14,10 +14,11 @@ var http = require('http')
1414
var fs = require('fs')
1515
var os = require('os')
1616
var semver = require('semver')
17+
var pkg = require('./package')
1718

1819
global.Git = require('./lib/gitmech')
1920

20-
program.version('1.7.1')
21+
program.version(pkg.version)
2122
.option('-c, --config <path>', 'Specify the config file')
2223
.option('-#, --hash-string <string>', 'Create an hash for a string')
2324
.option('-l, --local', 'Listen on localhost only')

lib/app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ module.exports.initialize = function (config) {
145145
res.locals._script = components.customScript()
146146

147147
if (/^\/auth\//.test(req.url) ||
148-
/^\/misc\//.test(req.url) ||
149-
(/^\/login/.test(req.url) && !config.get('authorization').anonRead)
148+
/^\/misc\//.test(req.url) ||
149+
(/^\/login/.test(req.url) && !config.get('authorization').anonRead)
150150
) {
151151
return next()
152152
}
@@ -178,6 +178,7 @@ module.exports.initialize = function (config) {
178178
app.all('/pages/*', requireAuthentication)
179179

180180
if (!app.locals.config.get('authorization').anonRead) {
181+
app.all('/wiki', requireAuthentication)
181182
app.all('/wiki/*', requireAuthentication)
182183
app.all('/search', requireAuthentication)
183184
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jingo",
3-
"version": "1.7.1",
3+
"version": "1.7.2",
44
"description": "A nodejs based wiki engine",
55
"author": "Claudio Cicali <claudio.cicali@gmail.com>",
66
"keywords": [

routes/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ if (auth.local.enabled) {
131131

132132
var foundUser = _.find(auth.local.accounts, function (account) {
133133
return account.username.toLowerCase() === wantedUsername &&
134-
account.passwordHash === wantedPasswordHash
134+
account.passwordHash.toLowerCase() === wantedPasswordHash.toLowerCase()
135135
})
136136

137137
if (!foundUser) {

0 commit comments

Comments
 (0)