Skip to content

Commit

Permalink
Closes #182 and #183
Browse files Browse the repository at this point in the history
  • Loading branch information
claudioc committed Dec 4, 2016
1 parent 43b5a97 commit 1a60663
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
7 changes: 7 additions & 0 deletions ChangeLog.md
@@ -1,3 +1,10 @@
Version 1.7.2, December 4th, 2016
==================================

- Closes #183 (accessible document list)
- Closes #182 (case insensitive test on SHA-1 passwords)
- Reads Jingo version from packages.json (no manual edit for version bump)

Version 1.7.1, November 5th, 2016
==================================

Expand Down
5 changes: 3 additions & 2 deletions jingo
Expand Up @@ -4,7 +4,7 @@
* Jingo, wiki engine
* http://github.com/claudioc/jingo
*
* Copyright 2015 Claudio Cicali <claudio.cicali@gmail.com>
* Copyright 2016 Claudio Cicali <claudio.cicali@gmail.com>
* Released under the MIT license
*/
var program = require('commander')
Expand All @@ -14,10 +14,11 @@ var http = require('http')
var fs = require('fs')
var os = require('os')
var semver = require('semver')
var pkg = require('./package')

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

program.version('1.7.1')
program.version(pkg.version)
.option('-c, --config <path>', 'Specify the config file')
.option('-#, --hash-string <string>', 'Create an hash for a string')
.option('-l, --local', 'Listen on localhost only')
Expand Down
5 changes: 3 additions & 2 deletions lib/app.js
Expand Up @@ -145,8 +145,8 @@ module.exports.initialize = function (config) {
res.locals._script = components.customScript()

if (/^\/auth\//.test(req.url) ||
/^\/misc\//.test(req.url) ||
(/^\/login/.test(req.url) && !config.get('authorization').anonRead)
/^\/misc\//.test(req.url) ||
(/^\/login/.test(req.url) && !config.get('authorization').anonRead)
) {
return next()
}
Expand Down Expand Up @@ -178,6 +178,7 @@ module.exports.initialize = function (config) {
app.all('/pages/*', requireAuthentication)

if (!app.locals.config.get('authorization').anonRead) {
app.all('/wiki', requireAuthentication)
app.all('/wiki/*', requireAuthentication)
app.all('/search', requireAuthentication)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "jingo",
"version": "1.7.1",
"version": "1.7.2",
"description": "A nodejs based wiki engine",
"author": "Claudio Cicali <claudio.cicali@gmail.com>",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion routes/auth.js
Expand Up @@ -131,7 +131,7 @@ if (auth.local.enabled) {

var foundUser = _.find(auth.local.accounts, function (account) {
return account.username.toLowerCase() === wantedUsername &&
account.passwordHash === wantedPasswordHash
account.passwordHash.toLowerCase() === wantedPasswordHash.toLowerCase()
})

if (!foundUser) {
Expand Down

0 comments on commit 1a60663

Please sign in to comment.