From: ivan Date: Mon, 22 Oct 2001 14:48:28 +0000 (+0000) Subject: fix dir check X-Git-Tag: freeside_1_4_0pre11~270 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=b7cdcea59f34c12f7d181c41014e0d2559bf983c fix dir check --- diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 71c47d6cd..8e29cb739 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -720,9 +720,10 @@ sub check { or return "Illegal finger: ". $self->getfield('finger'); $self->setfield('finger', $1); - $recref->{dir} =~ /^([\/\w\-]*)$/ + $recref->{dir} =~ /^([\/\w\-\.]*)$/ or return "Illegal directory"; $recref->{dir} = $1; + return "Illegal directory" if $recref->{dir} =~ /\.\./; #no .. unless ( $recref->{dir} ) { $recref->{dir} = $dir_prefix . '/'; if ( $dirhash > 0 ) { @@ -920,7 +921,7 @@ sub ssh { =head1 VERSION -$Id: svc_acct.pm,v 1.50 2001-10-02 11:10:19 ivan Exp $ +$Id: svc_acct.pm,v 1.51 2001-10-22 14:48:28 ivan Exp $ =head1 BUGS