]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: improve snapshot error handling
[Gitweb] / gitweb.perl
index 6b1239817d6782cca396ede4340f9b2738ffebe1f1ac15263cf9ea64a4bf8ce2..bc9034b3ebbcfd4d390301811c4a4641618a9afea25d0084eb0dee507b4850af 100755 (executable)
@@ -1525,10 +1525,10 @@ sub format_subject_html {
                $long =~ s/[[:cntrl:]]/?/g;
                return $cgi->a({-href => $href, -class => "list subject",
                                -title => to_utf8($long)},
-                      esc_html($short) . $extra);
+                      esc_html($short)) . $extra;
        } else {
                return $cgi->a({-href => $href, -class => "list subject"},
-                      esc_html($long)  . $extra);
+                      esc_html($long)) . $extra;
        }
 }
 
@@ -5191,10 +5191,10 @@ sub git_snapshot {
                die_error(400, "Invalid snapshot format parameter");
        } elsif (!exists($known_snapshot_formats{$format})) {
                die_error(400, "Unknown snapshot format");
-       } elsif (!grep($_ eq $format, @snapshot_fmts)) {
-               die_error(403, "Unsupported snapshot format");
        } elsif ($known_snapshot_formats{$format}{'disabled'}) {
                die_error(403, "Snapshot format not allowed");
+       } elsif (!grep($_ eq $format, @snapshot_fmts)) {
+               die_error(403, "Unsupported snapshot format");
        }
 
        if (!defined $hash) {
This page took 0.203224 seconds and 4 git commands to generate.