diff --git a/gitweb.cgi b/gitweb.cgi index 61fc23f060..80a883d80f 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -14,15 +14,21 @@ use CGI::Carp qw(fatalsToBrowser); my $cgi = new CGI; -my $version = "064"; +my $version = "070"; my $projectroot = "/pub/scm"; -my $defaultprojects = "linux/kernel/git"; +my $home_link = "/git"; my $gitbin = "/usr/bin"; my $gittmp = "/tmp/gitweb"; -my $giturl = "/pub/software/scm/cogito"; +my $logo_link = "/pub/software/scm/cogito"; my $my_url = $cgi->url(); my $my_uri = $cgi->url(-absolute => 1); +# remove # +my $projectroot = "/home/kay/public_html/pub/scm"; +my $home_link = "/~kay/git"; +my $logo_link = "/~kay/pub/software/scm/cogito"; +# remove # + mkdir($gittmp, 0700); my $project = $cgi->param('p'); my $action = $cgi->param('a'); @@ -33,8 +39,13 @@ my $time_back = $cgi->param('t'); $ENV{'SHA1_FILE_DIRECTORY'} = "$projectroot/$project/objects"; # validate input -if (defined($project) && $project =~ /(^|\/)(|\.|\.\.)($|\/)/) { - die_error("", "Invalid project parameter."); +if (defined($project)) { + if ($project =~ /(^|\/)(|\.|\.\.)($|\/)/) { + die_error("", "Invalid project parameter."); + } + if (!(-d "$projectroot/$project")) { + die_error("", "No such project."); + } } if (defined($file_name) && $file_name =~ /(^|\/)(|\.|\.\.)($|\/)/) { die_error("", "Invalid file parameter."); @@ -80,26 +91,18 @@ sub git_header_html { clear:both; background-color: #d9d8d1; } div.page_footer_text { float:left; color:#888888; font-size:10px;} - div.page_body { margin:0px 25px; padding:8px; clear:both; border: solid #d9d8d1; border-width:0px 1px; } + div.page_body { margin:0px 25px; padding:8px; clear:both; border:solid #d9d8d1; border-width:0px 1px; } div.title { display:block; margin:0px 25px; padding:8px; clear:both; font-weight:bold; background-color: #d9d8d1; color:#000000; } a.log_title { - display:block; margin:0px 25px; padding:8px; clear:both; + display:block; margin:0px 25px; padding:6px; clear:both; font-weight:bold; background-color: #d9d8d1; text-decoration:none; color:#000000; } a.log_title:hover { background-color: #c9c8c1; } - a.xml_logo { float:right; border:1px solid; - line-height:15px; - border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e; width:35px; - color:#ffffff; background-color:#ff6600; - font-weight:bold; font-family:sans-serif; text-align:center; - font-size:11px; display:block; text-decoration:none; - } - a.xml_logo:hover { background-color:#ee5500; } div.log_head { - margin:0px 25px; min-height: 30px; padding:8px; clear:both; + margin:0px 25px; padding:8px; clear:both; border: solid #d9d8d1; border-width:0px 1px; font-family:monospace; background-color: #edece6; } @@ -108,18 +111,28 @@ sub git_header_html { border:solid #d9d8d1; border-width:0px 1px; } span.log_age { position:relative; float:left; width:142px; } - div.log_functions { font-size:10px; font-family:sans-serif; position:relative; float:left; width:142px; } - div.signed_off { color: #a9a8a1; } + div.log_link { font-size:10px; font-family:sans-serif; position:relative; float:left; width:142px; } + div.list { + display:block; margin:0px 25px; padding:2px 8px; border:solid #d9d8d1; border-width:0px 1px; + font-family:monospace; background-color: #edece6; + } + div.link { margin:0px 25px; padding:4px 8px; border:solid #d9d8d1; border-width:0px 1px; font-family:sans-serif; font-size:10px; } + a.xml_logo { float:right; border:1px solid; + line-height:15px; + border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e; width:35px; + color:#ffffff; background-color:#ff6600; + font-weight:bold; font-family:sans-serif; text-align:center; + font-size:11px; display:block; text-decoration:none; + } + a.xml_logo:hover { background-color:#ee5500; }
EOF print "