Skip to content

Fix ACL check for internal index.html redirect - #282

Merged
nicola merged 4 commits into
masterfrom
fix-index-handler
Mar 14, 2016
Merged

Fix ACL check for internal index.html redirect#282
nicola merged 4 commits into
masterfrom
fix-index-handler

Conversation

@deiu

@deiu deiu commented Mar 11, 2016

Copy link
Copy Markdown

Given a private container /foo/ and a public document /foo/index.html, lnode's ACL system currently checks if /foo/ is readable before passing the request to the index handler, therefore blocking access to /foo/index.html.

This PR introduces a fix, where the index handler takes precedence over the ACL check for read operations (GET).

Comment thread lib/handlers/index.js Outdated
@@ -18,40 +16,27 @@ function handler (req, res, next) {
if (err) return next()

res.locals.path = req.path

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for this line here

@deiu

deiu commented Mar 14, 2016

Copy link
Copy Markdown
Author

OK, I've removed that obsolete line. Ready for merge.

nicola added a commit that referenced this pull request Mar 14, 2016
Fix ACL check for internal index.html redirect
@nicola
nicola merged commit 5e21a13 into master Mar 14, 2016
@dmitrizagidulin
dmitrizagidulin deleted the fix-index-handler branch March 14, 2016 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants