Permalink
Browse files

Hackaround for tainted $0 in Syslog

Bump versoin to 2.25 and changelog
  • Loading branch information...
1 parent 850f9ec commit d87690a0d007ad5d85564264d9df1e628155db28 @autarch autarch committed Sep 15, 2009
View
@@ -1,3 +1,11 @@
+2.25 Sep 15, 2009
+
+- Added a workaround for a weird tainting issue with Params::Validate. This
+ caused a taint exception when a Log::Dispatch::Syslog was created under
+ taint mode. Note that there is still a problem in Params::Validate itself,
+ this is just a hack.
+
+
2.24 Sep 13, 2009
- Simplified new constructor API (the 2.23 API is still silently supported but
View
@@ -9,7 +9,7 @@ use base qw( Log::Dispatch::Base );
use Params::Validate qw(validate_with ARRAYREF CODEREF);
use Carp ();
-our $VERSION = '2.24';
+our $VERSION = '2.25';
our %LEVELS;
@@ -10,7 +10,7 @@ use base qw( Log::Dispatch::Output );
use Params::Validate qw(validate);
Params::Validate::validation_options( allow_extra => 1 );
-our $VERSION = '2.24';
+our $VERSION = '2.25';
BEGIN
View
@@ -3,7 +3,7 @@ package Log::Dispatch::Base;
use strict;
use warnings;
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub _get_callbacks
@@ -10,7 +10,7 @@ use base qw( Log::Dispatch::Output );
use Params::Validate qw(validate SCALAR ARRAYREF BOOLEAN);
Params::Validate::validation_options( allow_extra => 1 );
-our $VERSION = '2.24';
+our $VERSION = '2.25';
# need to untaint this value
my ($program) = $0 =~ /(.+)/;
@@ -9,7 +9,7 @@ use base qw( Log::Dispatch::Email );
use MIME::Lite;
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub send_email
@@ -9,7 +9,7 @@ use base qw( Log::Dispatch::Email );
use Mail::Send;
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub send_email
{
@@ -14,7 +14,7 @@ use base qw( Log::Dispatch::Email );
use Mail::Sender ();
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub new
{
@@ -9,7 +9,7 @@ use base qw( Log::Dispatch::Email );
use Mail::Sendmail ();
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub send_email
View
@@ -10,7 +10,7 @@ use base qw( Log::Dispatch::Output );
use Params::Validate qw(validate SCALAR BOOLEAN);
Params::Validate::validation_options( allow_extra => 1 );
-our $VERSION = '2.24';
+our $VERSION = '2.25';
# Prevents death later on if IO::File can't export this constant.
*O_APPEND = \&APPEND unless defined &O_APPEND;
@@ -7,7 +7,7 @@ use base qw( Log::Dispatch::File );
use Fcntl qw(:DEFAULT :flock);
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub _open_file
@@ -10,7 +10,7 @@ use base qw( Log::Dispatch::Output );
use Params::Validate qw(validate SCALAR ARRAYREF BOOLEAN);
Params::Validate::validation_options( allow_extra => 1 );
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub new
{
View
@@ -7,7 +7,7 @@ use Log::Dispatch::Output;
use base qw( Log::Dispatch::Output );
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub new
@@ -12,7 +12,7 @@ Params::Validate::validation_options( allow_extra => 1 );
use Carp ();
-our $VERSION = '2.24';
+our $VERSION = '2.25';
my $level_names = [ qw( debug info notice warning error critical alert emergency ) ];
my $ln = 0;
@@ -10,7 +10,7 @@ use base qw( Log::Dispatch::Output );
use Params::Validate qw(validate BOOLEAN);
Params::Validate::validation_options( allow_extra => 1 );
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub new
@@ -12,7 +12,7 @@ Params::Validate::validation_options( allow_extra => 1 );
use Sys::Syslog 0.16 ();
-our $VERSION = '2.24';
+our $VERSION = '2.25';
sub new
{
@@ -29,12 +29,13 @@ sub new
return $self;
}
+my ($Ident) = $0 =~ /(.+)/;
sub _init
{
my $self = shift;
my %p = validate( @_, { ident => { type => SCALAR,
- default => $0 },
+ default => $Ident },
logopt => { type => SCALAR,
default => '' },
facility => { type => SCALAR,

0 comments on commit d87690a

Please sign in to comment.