[ic] [interchange] Fix potential "use of uninitialized value" if called during startup

Stefan Hornburg (Racke) racke at linuxia.de
Fri Jun 23 07:20:40 UTC 2017


Hallo David,

thanks very much on your effort to clean up Interchange!

I think the // operator isn't present in older Perls.

Regards
         Racke

On 06/22/2017 10:05 PM, David Christensen wrote:
> commit af6e71231e72eb42b88d4100b500e3d34e5a2adc
> Author: David Christensen <david at endpoint.com>
> Date:   Thu Jun 22 14:38:50 2017 -0500
> 
>     Fix potential "use of uninitialized value" if called during startup
> 
>  lib/Vend/File.pm |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> ---
> diff --git a/lib/Vend/File.pm b/lib/Vend/File.pm
> index 386ed74..6d9d4ee 100644
> --- a/lib/Vend/File.pm
> +++ b/lib/Vend/File.pm
> @@ -707,10 +707,13 @@ sub allowed_file {
>  	my $fn = shift;
>  	my $write = shift;
>  	my $status = 1;
> +	my $pat;
>  	$Vend::File::errstr = '';
>  	if(	$Global::NoAbsolute
>  			and
> -		$fn !~ $Global::AllowedFileRegex->{$Vend::Cat}
> +		$pat = $Global::AllowedFileRegex->{$Vend::Cat // ''}
> +			and
> +		$fn !~ $pat
>  			and
>  		absolute_or_relative($fn)
>  		)
> 
> _______________________________________________
> interchange-cvs mailing list
> interchange-cvs at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-cvs
> 


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration.



More information about the interchange-users mailing list