arthaud / git-dumper

A tool to dump a git repository from a website
MIT License
1.69k stars 235 forks source link

Recursive download incorrectly includes ../ #9

Closed Reelix closed 3 years ago

Reelix commented 3 years ago

If http://site.com/.git/ returns a 200 response code indicating a directory listing, the script starts downloading recursively.

Unfortunately, the recursive download parses ../ which leads to is_html assertion errors (http://site.com/.git/../ goes to http://site.com/) and infinite loops (Since it returns back to a directory that it's already been through)

hilarex commented 3 years ago

I found a solution : just add url.path != '../' and on line 46

iNoSec2 commented 3 years ago

thanks hilarex!!! solved my problem too :)

arthaud commented 3 years ago

Feel free to submit a PR :)

iNoSec2 commented 3 years ago

i made it on GitTools repo and added acd $BASEDIR && git checkout . too