bottlepy / bottle

bottle.py is a fast and simple micro-framework for python web-applications.
http://bottlepy.org/
MIT License
8.38k stars 1.46k forks source link

Serving root disk on Windows get's Access Denied in 0.12.* #1129

Open danny0838 opened 5 years ago

danny0838 commented 5 years ago

When serving disk root on Windows such as T:\ bottle always returns access denied when using static_file.

Below line needs fixed: https://github.com/bottlepy/bottle/blob/246c1f6d820cf5043695d39b58b09671f3f10b3a/bottle.py#L2465

This seems to be done in 0.13, but it is not yet released, package installation via pip gets only 0.12. and is vulnerable to this issue. Could you release a hotfix version in 0.12. if 0.13.* won't be released soon?

danny0838 commented 5 years ago

Hello. I see you released 0.12.17 recently. Could you do a favor and provide a hotfix for this issue if 0.13.* is not ready yet?

Just change this line: https://github.com/bottlepy/bottle/blob/246c1f6d820cf5043695d39b58b09671f3f10b3a/bottle.py#L2465

to:

root = os.path.join(os.path.abspath(root), '')

like 0.13 have done.