summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cbdefb5)
raw | patch | inline | side by side (parent: cbdefb5)
author | Mark Rada <marada@uwaterloo.ca> | |
Tue, 25 Aug 2009 04:59:48 +0000 (00:59 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 25 Aug 2009 23:33:06 +0000 (16:33 -0700) |
The last check in the second block of checks in the &git_snapshot routine
is never executed because the second to last check is a superset of the
last check.
Switch the order of the last two checks. It has the advantage of giving
clients a more specific reason why they cannot get a snapshot format if
the format they have chosen is disabled.
Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
is never executed because the second to last check is a superset of the
last check.
Switch the order of the last two checks. It has the advantage of giving
clients a more specific reason why they cannot get a snapshot format if
the format they have chosen is disabled.
Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 84659f5672985a248d0cadd1d9cbb7b3fb76e4fa..b453ed0452815772752766c9099a3c3c29cac330 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
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) {