Message357074
is_cgi() in CGIHTTPRequestHandler class separates given path into (dir, rest) then checks if dir is in cgi_directories. However, it divides based on the first seen '/', multi-level directories like /sub/dir/cgi-bin/hello.py is divided into head=/sub, rest=dir/cgi-bin/hello.py then check whether '/sub' exists in cgi_directories = [..., '/sub/dir/cgi-bin'].
If the function divides by last seen '/', it works correctly as head=/sub/dir/cgi-bin, rest=hello.py |
|
| Date |
User |
Action |
Args |
| 2019-11-20 14:01:19 | kkangshawn | set | recipients:
+ kkangshawn |
| 2019-11-20 14:01:19 | kkangshawn | set | messageid: <1574258479.69.0.180515084691.issue38863@roundup.psfhosted.org> |
| 2019-11-20 14:01:19 | kkangshawn | link | issue38863 messages |
| 2019-11-20 14:01:19 | kkangshawn | create | |
|