From bde32987fd3b9ccb1c830bb290fa4008b3a8c84c Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Thu, 12 May 2011 21:35:22 -0700 Subject: pinyweb: making '0' an acceptable variable value --- pinyweb/cgi-bin/auth/pinyconfig.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pinyweb/cgi-bin/auth/pinyconfig.cgi') diff --git a/pinyweb/cgi-bin/auth/pinyconfig.cgi b/pinyweb/cgi-bin/auth/pinyconfig.cgi index af7cebd..4fd8e89 100755 --- a/pinyweb/cgi-bin/auth/pinyconfig.cgi +++ b/pinyweb/cgi-bin/auth/pinyconfig.cgi @@ -13,11 +13,11 @@ $q = CGI->new; print( "Content-type: text/plain\n\n"); -if( $q->param('r') && $q->param('n') && $q->param('v') ) { +if( defined( $q->param('r') ) && defined( $q->param('n') ) && defined( $q->param('v') ) ) { unless( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'pinyconfig', $q->param('r'), $q->param('n'), $q->param('v') ) == 0 ) { die( 'pinyconfig was unsuccessful.' ); }; -} elsif( $q->param('r') ) { +} elsif( defined( $q->param('r') ) ) { unless( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'pinyconfig', $q->param('r') ) == 0 ) { die( 'pinyconfig was unsuccessful.' ); }; -- cgit v1.2.3