Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keymaster() out of sync with external router #89

Closed
avoidwork opened this issue Aug 18, 2017 · 1 comment
Closed

keymaster() out of sync with external router #89

avoidwork opened this issue Aug 18, 2017 · 1 comment

Comments

@avoidwork
Copy link
Owner

avoidwork commented Aug 18, 2017

The keymaster() middleware is referencing the explicit routes in the server config, which is no longer in sync with the external router.

function keymaster (req, res, next) {
	const obj = req.server.tenso,
		authd = req.session !== void 0 && req.isAuthenticated();

	// No authentication, or it's already happened
	if (!req.protect || !req.protectAsync || authd) {
		const method = regex.get_rewrite.test(req.method) ? "get" : req.method.toLowerCase(),
			routes = req.server.config.routes[method] || {}, // <-- this is the issue
@avoidwork
Copy link
Owner Author

avoidwork commented Aug 18, 2017

This was not the issue; pebkac? ... auth route was not explicitly protected by config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant