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

1.5.2 broke my files route #164

Open
rpodgorny opened this issue Apr 4, 2017 · 4 comments
Open

1.5.2 broke my files route #164

rpodgorny opened this issue Apr 4, 2017 · 4 comments

Comments

@rpodgorny
Copy link

(route/files "/raw" {:root "/"})

...this works for me with 1.5.1 but returns "not found" for the same path in 1.5.2.

@weavejester
Copy link
Owner

You're serving files from your root path?

Compojure 1.5.2 just updated Ring to fix a directory traversal bug, so I suspect you're running into the consequences of that. Do you have any symlinks on your path? You might need to add the :allow-symlinks? true option to your option map.

@rpodgorny
Copy link
Author

yes, i am. this is just for testing purposes - i'm a complete clojure beginner just playing and discovering.

adding :allow-symlinks indeed fixed the issue but in my case, no symlinks are involved - maybe a bug?

@weavejester
Copy link
Owner

weavejester commented Apr 4, 2017

It might be an issue specific to the root path. My guess is that if you tried any other :root, it would work fine.

If this is a bug related to the root path, it's something that will be fixed eventually, but as I'm sure you can appreciate, not exactly high priority since most of the time we don't want to serve files from the root :)

@rpodgorny
Copy link
Author

yeah, that's possible. i'm just reporting because this is a breaking change which imho should not happen for .patch version release... ;-)

i totally understand the priority.

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

2 participants