|
Lines 2455-2464
def generate_tarball_header(out, name, s
Link Here
|
| 2455 |
def generate_tarball(out, relative, directory, tag, stack=[]): |
2455 |
def generate_tarball(out, relative, directory, tag, stack=[]): |
| 2456 |
subdirs = [ ] |
2456 |
subdirs = [ ] |
| 2457 |
rcs_files = [ ] |
2457 |
rcs_files = [ ] |
|
|
2458 |
if relative == 'CVSROOT' and cfg.options.hide_cvsroot: |
| 2459 |
return |
| 2460 |
|
| 2458 |
for file, pathname, isdir in get_file_data(directory): |
2461 |
for file, pathname, isdir in get_file_data(directory): |
| 2459 |
if pathname == _UNREADABLE_MARKER: |
2462 |
if pathname == _UNREADABLE_MARKER: |
| 2460 |
continue |
2463 |
continue |
| 2461 |
if isdir: |
2464 |
if isdir: |
|
|
2465 |
if file == 'CVSROOT' and relative.find('/') == -1 and cfg.options.hide_cvsroot: |
| 2466 |
continue |
| 2467 |
if relative.find('/') == -1 and cfg.is_forbidden(file): |
| 2468 |
continue |
| 2462 |
subdirs.append(file) |
2469 |
subdirs.append(file) |
| 2463 |
else: |
2470 |
else: |
| 2464 |
rcs_files.append(file) |
2471 |
rcs_files.append(file) |
|
Lines 2583-2588
def main():
Link Here
|
| 2583 |
'</body></html>\n') |
2590 |
'</body></html>\n') |
| 2584 |
return |
2591 |
return |
| 2585 |
|
2592 |
|
|
|
2593 |
if where == 'CVSROOT' and cfg.options.hide_cvsroot: |
| 2594 |
print "Status: 400" |
| 2595 |
http_header() |
| 2596 |
print ('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n' |
| 2597 |
'<html><head>\n<title>400 Bad Request</title>\n' |
| 2598 |
'</head><body>\n' |
| 2599 |
'<H1>Bad Request</H1>\n Listing of CVSROOT is disallowed.<p>\n' |
| 2600 |
'</body></html>\n') |
| 2601 |
return |
| 2602 |
|
| 2586 |
### look for GZIP binary |
2603 |
### look for GZIP binary |
| 2587 |
|
2604 |
|
| 2588 |
# if we have a directory and the request didn't end in "/", then redirect |
2605 |
# if we have a directory and the request didn't end in "/", then redirect |