≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1423

Bug #1423: GitWeb "Use of uninitialized value" errors since updating to Git 1.6.3.3

Kind bug
Product wincent.dev
When Created 2009-10-17T09:22:12Z, updated 2010-04-14T17:41:39Z
Status closed
Reporter Greg Hurrell
Tags no tags

Description

Looking through server error logs, started seeing error messages like the following on 12 July 2009, which corresponds with the update to GitWeb from Git 1.6.3.3 (see "Updating to Git 1.6.3.3").

[Sun Jul 12 08:28:01 2009] [error] [client 65.55.232.25] [Sun Jul 12 08:28:01 2009] gitweb.cgi: Use of uninitialized value in exists at gitweb.cgi line 461.
[Sun Jul 12 08:28:01 2009] [error] [client 65.55.232.25] [Sun Jul 12 08:28:01 2009] gitweb.cgi: Use of uninitialized value in exists at gitweb.cgi line 458.

Later on the line numbers change (I think due to another update), but the errors are still basically the same:

[Sat Oct 17 09:14:14 2009] [error] [client 72.30.142.177] [Sat Oct 17 09:14:14 2009] gitweb.cgi: Use of uninitialized value in hash element at gitweb.cgi line 493.
[Sat Oct 17 09:14:14 2009] [error] [client 72.30.142.177] [Sat Oct 17 09:14:14 2009] gitweb.cgi: Use of uninitialized value in exists at gitweb.cgi line 496.

Here is the corresponding part of the gitweb.cgi file:

    488 # process alternate names for backward compatibility
    489 # filter out unsupported (unknown) snapshot formats
    490 sub filter_snapshot_fmts {
    491         my @fmts = @_;
    492 
    493         @fmts = map {
    494                 exists $known_snapshot_format_aliases{$_} ?
    495                        $known_snapshot_format_aliases{$_} : $_} @fmts;
    496         @fmts = grep {
    497                 exists $known_snapshot_formats{$_} } @fmts;
    498 }

Also seeing these errors:

[Sat Oct 17 07:04:12 2009] [error] [client 72.30.142.177] [Sat Oct 17 07:04:12 2009] gitweb.cgi: Use of uninitialized value in string eq at gitweb.cgi line 943.

Which corresponds to:

    935                 # Next, we put hash_parent_base:/file_parent..hash_base:/file_name,
    936                 # stripping nonexistent or useless pieces
    937                 $href .= "/" if ($params{'hash_base'} || $params{'hash_parent_base'}
    938                         || $params{'hash_parent'} || $params{'hash'});
    939                 if (defined $params{'hash_base'}) {
    940                         if (defined $params{'hash_parent_base'}) {
    941                                 $href .= esc_url($params{'hash_parent_base'});
    942                                 # skip the file_parent if it's the same as the file_name
    943                                 delete $params{'file_parent'} if $params{'file_parent'} eq $params{'file_name'};
    944                                 if (defined $params{'file_parent'} && $params{'file_parent'} !~ /\.\./) {
    945                                         $href .= ":/".esc_url($params{'file_parent'});
    946                                         delete $params{'file_parent'};
    947                                 }
    948                                 $href .= "..";
    949                                 delete $params{'hash_parent'};
    950                                 delete $params{'hash_parent_base'};
    951                         } elsif (defined $params{'hash_parent'}) {
    952                                 $href .= esc_url($params{'hash_parent'}). "..";
    953                                 delete $params{'hash_parent'};
    954                         }
    955 
    956                         $href .= esc_url($params{'hash_base'});
    957                         if (defined $params{'file_name'} && $params{'file_name'} !~ /\.\./) {
    958                                 $href .= ":/".esc_url($params{'file_name'});
    959                                 delete $params{'file_name'};
    960                         }
    961                         delete $params{'hash'};
    962                         delete $params{'hash_base'};
    963                 } elsif (defined $params{'hash'}) {
    964                         $href .= esc_url($params{'hash'});
    965                         delete $params{'hash'};
    966                 }

Comments

  1. Greg Hurrell 2009-10-18T07:52:20Z

    Just updated the server to 1.6.5.1, and had a quick glance at the changes; looks like these error messages might be squished now, so will keep an eye on the logs to confirm.

  2. Greg Hurrell 2010-04-14T17:41:19Z

    Definitely looks squished. Will mark as closed.

  3. Greg Hurrell 2010-04-14T17:41:39Z

    Status changed:

    • From: new
    • To: closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets