View | Details | Raw Unified | Return to bug 63989
Collapse All | Expand All

(-)lib/viewcvs.py (-3 / +8 lines)
Lines 2630-2640 def generate_tarball_header(out, name, s Link Here
2630
def generate_tarball(out, request, tar_top, rep_top,
2630
def generate_tarball(out, request, tar_top, rep_top,
2631
                     reldir, options, stack=[]):
2631
                     reldir, options, stack=[]):
2632
  cvs = request.roottype == 'cvs'
2632
  cvs = request.roottype == 'cvs'
2633
  if cvs and (rep_top == '' and 0 < len(reldir) and
2633
  if (0 < len(rep_top) and rep_top[0] == 'CVSROOT' and cfg.options.hide_cvsroot):
2634
              reldir[0] == 'CVSROOT' and cfg.options.hide_cvsroot):
2635
    return
2634
    return
2636
2635
2637
  if (rep_top == '' and cfg.is_forbidden(reldir[0])):
2636
  if (0 < len(reldir) and reldir[0] == 'CVSROOT' and cfg.options.hide_cvsroot):
2637
    return
2638
2639
  if (rep_top == [] and 0 < len(reldir) and cfg.is_forbidden(reldir[0])):
2638
    return
2640
    return
2639
2641
2640
  rep_path = rep_top + reldir
2642
  rep_path = rep_top + reldir
Lines 2710-2715 def download_tarball(request): Link Here
2710
  rep_top = request.path_parts
2712
  rep_top = request.path_parts
2711
  if len(rep_top):
2713
  if len(rep_top):
2712
    tar_top = rep_top[-1]
2714
    tar_top = rep_top[-1]
2715
    if cfg.is_forbidden(tar_top):
2716
      raise debug.ViewCVSException('Access to "%s" is forbidden.'
2717
                                  % tar_top, '403 Forbidden')
2713
  else:
2718
  else:
2714
    tar_top = request.rootname
2719
    tar_top = request.rootname
2715
2720

Return to bug 63989