[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/contrib ChangeLog commit_prep.pl log_accum.pl
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/contrib ChangeLog commit_prep.pl log_accum.pl |
Date: |
Tue, 09 May 2006 16:40:54 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch:
Changes by: Derek Robert Price <address@hidden> 06/05/09 16:40:54
Modified files:
contrib : ChangeLog commit_prep.pl log_accum.pl
Log message:
* commit_prep.pl: Update copyright year.
* log_accum.pl: Update copyright year. Restore taint checks and add
some additional untainting code. Update doc.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/contrib/ChangeLog.diff?tr1=1.182&tr2=1.183&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/contrib/commit_prep.pl.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/contrib/log_accum.pl.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
Patches:
Index: ccvs/contrib/ChangeLog
diff -u ccvs/contrib/ChangeLog:1.182 ccvs/contrib/ChangeLog:1.183
--- ccvs/contrib/ChangeLog:1.182 Tue May 9 03:07:00 2006
+++ ccvs/contrib/ChangeLog Tue May 9 16:40:54 2006
@@ -1,3 +1,9 @@
+2006-05-09 Derek Price <address@hidden>
+
+ * commit_prep.pl: Update copyright year.
+ * log_accum.pl: Update copyright year. Restore taint checks and add
+ some additional untainting code. Update doc.
+
2006-05-08 Derek Price <address@hidden>
* log_accum.pl: -r now also accepts 'HEAD' as argument (clearer than
Index: ccvs/contrib/commit_prep.pl
diff -u ccvs/contrib/commit_prep.pl:1.6 ccvs/contrib/commit_prep.pl:1.7
--- ccvs/contrib/commit_prep.pl:1.6 Mon May 8 21:25:32 2006
+++ ccvs/contrib/commit_prep.pl Tue May 9 16:40:54 2006
@@ -1,7 +1,7 @@
#! @PERL@ -T
# -*-Perl-*-
-# Copyright (C) 1994-2005 The Free Software Foundation, Inc.
+# Copyright (C) 1994-2006 The Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Index: ccvs/contrib/log_accum.pl
diff -u ccvs/contrib/log_accum.pl:1.14 ccvs/contrib/log_accum.pl:1.15
--- ccvs/contrib/log_accum.pl:1.14 Tue May 9 03:07:00 2006
+++ ccvs/contrib/log_accum.pl Tue May 9 16:40:54 2006
@@ -1,7 +1,7 @@
-#! @PERL@
+#! @PERL@ -T
# -*-Perl-*-
-# Copyright (C) 1994-2005 The Free Software Foundation, Inc.
+# Copyright (C) 1994-2006 The Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -57,6 +57,8 @@
# content type; diff URLs are also more compatible with viewcvs
# (removed '.diff')
# - do not perform a diff if a file is added or removed
+# Derek Price (2006-05-08):
+# - Perform the diff if added or removed unless -E is specified.
use strict;
@@ -303,7 +305,7 @@
if ($oldrev{$file}) {
open(RCS, "-|") || exec "$CVSBIN/cvs", '-Qn', 'log',
"-r$newrev{$file}",
- '--', $file;
+ "--", $file;
while (<RCS>) {
if (/^date:.*lines:([^;]+);.*/) {
$delta = $1;
@@ -541,6 +543,7 @@
# (though first invocation always removes the default `-ub').
# Implies `-D'.
# -E - Suppress diffs against added and removed (empty) files.
+# Implies `-D'.
# -m EMAIL - Set mailto address.
# -p PROJECT - Set full repository path.
# -r TAG - operate only on changes with tag TAG
@@ -561,6 +564,7 @@
$SEND_DIFF = "true";
} elsif ($arg eq '-E') {
$SUPPRESS_DIFFS_AGAINST_EMPTIES = "true";
+ $SEND_DIFF = "true";
} elsif ($arg eq '-m') {
push @mailto, split (/[ ,]+/, shift @argv);
} elsif ($arg eq '-p') {
@@ -607,14 +611,6 @@
$newrev{$filename} = 0 if $newrev{$filename} eq "NONE";
# Untaint.
- if ($filename =~ m#^([^/]+)$#)
- {
- $filename = $1;
- }
- else
- {
- die "invalid characters in $filename";
- }
if ($oldrev{$filename} =~ /^([0-9.]+)$/)
{
$oldrev{$filename} = $1;
@@ -746,12 +742,20 @@
if (/^Removed Files/) { $state = $STATE_REMOVED; next; }
if (/^Log Message/) { $state = $STATE_LOG; last; }
s/[ \t\n]+$//; # delete trailing space
-
- push (@changed_files, split) if ($state == $STATE_CHANGED);
- push (@added_files, split) if ($state == $STATE_ADDED);
- push (@removed_files, split) if ($state == $STATE_REMOVED);
+
+ next if $state == $STATE_NONE || $state == $STATE_LOG;
+
+ # Untaint.
+ my @tmp_list = map {die "dir in $_" if !m#^([^/]+)$#; $1;} split;
+ #print "map: {", join (", ", @tmp_list), "}\n";
+
+ # Store.
+ push (@changed_files, @tmp_list) if ($state == $STATE_CHANGED);
+ push (@added_files, @tmp_list) if ($state == $STATE_ADDED);
+ push (@removed_files, @tmp_list) if ($state == $STATE_REMOVED);
}
-# Proces the /Log Message/ section now, if it exists.
+
+# Process the /Log Message/ section now, if it exists.
# Do this here rather than above to deal with Log messages
# that include lines that confuse the state machine.
if (!eof(STDIN)) {