[vhffs-dev] [2249] force scalar context on $cgi->param() where it is necessary to prevent list context abuse

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 2249
Author:   gradator
Date:     2014-10-12 23:12:09 +0200 (Sun, 12 Oct 2014)
Log Message:
-----------
force scalar context on $cgi->param() where it is necessary to prevent list context abuse

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Auth.pm
    trunk/vhffs-api/src/Vhffs/Panel/Bazaar.pm
    trunk/vhffs-api/src/Vhffs/Panel/Broadcast.pm
    trunk/vhffs-api/src/Vhffs/Panel/Contact.pm
    trunk/vhffs-api/src/Vhffs/Panel/Cron.pm
    trunk/vhffs-api/src/Vhffs/Panel/Cvs.pm
    trunk/vhffs-api/src/Vhffs/Panel/DNS.pm
    trunk/vhffs-api/src/Vhffs/Panel/Git.pm
    trunk/vhffs-api/src/Vhffs/Panel/Group.pm
    trunk/vhffs-api/src/Vhffs/Panel/Mail.pm
    trunk/vhffs-api/src/Vhffs/Panel/MailingList.pm
    trunk/vhffs-api/src/Vhffs/Panel/Mercurial.pm
    trunk/vhffs-api/src/Vhffs/Panel/Moderation.pm
    trunk/vhffs-api/src/Vhffs/Panel/Mysql.pm
    trunk/vhffs-api/src/Vhffs/Panel/Object.pm
    trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm
    trunk/vhffs-api/src/Vhffs/Panel/Public.pm
    trunk/vhffs-api/src/Vhffs/Panel/Repository.pm
    trunk/vhffs-api/src/Vhffs/Panel/Subscribe.pm
    trunk/vhffs-api/src/Vhffs/Panel/Svn.pm
    trunk/vhffs-api/src/Vhffs/Panel/Tag.pm
    trunk/vhffs-api/src/Vhffs/Panel/User.pm
    trunk/vhffs-api/src/Vhffs/Panel/Web.pm

Modified: trunk/vhffs-api/src/Vhffs/Panel/Auth.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Auth.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Auth.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -48,7 +48,7 @@
 	my $website = $vhffs->get_config->get_host_website;
 	my $cgi = $panel->{cgi};
 	my $vars = {};
-	$vars->{username} = $cgi->param('username');
+	$vars->{username} = scalar $cgi->param('username');
 	$vars->{subscription_allowed} = $vhffs->get_config->get_allow_subscribe;
 	$vars->{website} = $website;
 	$vars->{hostname} = $hostname;
@@ -82,7 +82,7 @@
 		}
 	}
 
-	my $user = Vhffs::User::get_by_username($vhffs, $cgi->param('username') );
+	my $user = Vhffs::User::get_by_username($vhffs, scalar $cgi->param('username') );
 	my $password = $cgi->param('password');
 
 	# Incomplete input
@@ -150,7 +150,7 @@
 	}
 
 	# username submitted
-	my $user = Vhffs::User::get_by_username( $vhffs, $cgi->param('username') );
+	my $user = Vhffs::User::get_by_username( $vhffs, scalar $cgi->param('username') );
 	if( defined $user and $user->{'state'} == Vhffs::Constants::ACTIVATED )  {
 
 		# create a new password for this user

Modified: trunk/vhffs-api/src/Vhffs/Panel/Bazaar.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Bazaar.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Bazaar.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -121,7 +121,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('message/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -136,7 +136,7 @@
 	if( $submitted ) {
 		$reponame = $cgi->param('reponame');
 		my $fullreponame = $group->get_groupname.'/'.$reponame;
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 		unless( defined $reponame and defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
 		} else {
@@ -260,7 +260,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') } );
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/Broadcast.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Broadcast.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Broadcast.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -61,8 +61,8 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $subject = Encode::decode_utf8( $cgi->param('subject') );
-	my $body = Encode::decode_utf8( $cgi->param('body') );
+	my $subject = Encode::decode_utf8( scalar $cgi->param('subject') );
+	my $body = Encode::decode_utf8( scalar $cgi->param('body') );
 	my $vars = {};
 
 	if(defined $subject and defined $body) {

Modified: trunk/vhffs-api/src/Vhffs/Panel/Contact.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Contact.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Contact.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -59,8 +59,8 @@
 	if( defined  $cgi->param('subject') and defined $cgi->param('message') ) {
 		my $to = $vhffs->get_config->get_alert_mail;
 		my $from = $user->get_mail;
-		my $subject = Encode::decode_utf8( $cgi->param('subject') );
-		my $message = gettext('Message sent by the following account').': '.$user->get_username."\n\n".Encode::decode_utf8( $cgi->param('message') );
+		my $subject = Encode::decode_utf8( scalar $cgi->param('subject') );
+		my $message = gettext('Message sent by the following account').': '.$user->get_username."\n\n".Encode::decode_utf8( scalar $cgi->param('message') );
 
 		Vhffs::Functions::send_mail( $vhffs , $from , $to , undef , $subject , $message );
 		$vars->{message} = gettext('Message sent successfully');

Modified: trunk/vhffs-api/src/Vhffs/Panel/Cron.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Cron.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Cron.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -107,7 +107,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -126,7 +126,7 @@
 		$cronpath = $cgi->param('cronpath');
 		$interval = $cgi->param('interval');
 		$reportmail = $cgi->param('reportmail');
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 
 		unless( defined $cronpath and defined $interval and defined $reportmail and defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
@@ -239,7 +239,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') } );
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/Cvs.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Cvs.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Cvs.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -121,7 +121,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -136,7 +136,7 @@
 	if($submitted) {
 		$reponame = $cgi->param('reponame');
 		my $fullreponame = $group->get_groupname.'/'.$reponame;
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 
 		unless( defined $reponame and defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
@@ -233,7 +233,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') });
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/DNS.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/DNS.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/DNS.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -346,7 +346,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -360,7 +360,7 @@
 
 	if( $submitted ) {
 		$domain_name = $cgi->param('DOMAIN_NAME');
-		$description = Encode::decode_utf8( $cgi->param('DESCRIPTION') );
+		$description = Encode::decode_utf8( scalar $cgi->param('DESCRIPTION') );
 
 		unless( defined $domain_name and defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
@@ -582,7 +582,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined($group) ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') } );
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/Git.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Git.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Git.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -123,7 +123,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -138,7 +138,7 @@
 	if( $submitted ) {
 		$reponame = $cgi->param('reponame');
 		my $fullreponame = $group->get_groupname.'/'.$reponame.'.git';
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 		unless( defined $reponame && defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
 		} else {
@@ -262,7 +262,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined($group) ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') } );
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Group.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Group.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -293,8 +293,8 @@
 
 	my $submitted = defined($cgi->param('project_submit'));
 	my $groupname = $cgi->param('project_name');
-	my $realname = Encode::decode_utf8( $cgi->param('realname') );
-	my $description = Encode::decode_utf8( $cgi->param('description') );
+	my $realname = Encode::decode_utf8( scalar $cgi->param('realname') );
+	my $description = Encode::decode_utf8( scalar $cgi->param('description') );
 
 	if($submitted) {
 		# User posted the form, let's check it
@@ -353,7 +353,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You must specify a project name' ) });
 		return;
@@ -416,7 +416,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	my $vars = {};
 
 	unless( defined $group ) {
@@ -436,8 +436,8 @@
 		unless( $user->can_modify( $group ) ) {
 			$panel->add_error( gettext( 'You\'re not allowed to do this (ACL rights)' ) );
 		} else {
-			my $description = Encode::decode_utf8( $cgi->param( 'description' ) );
-			my $realname = Encode::decode_utf8( $cgi->param( 'realname' ) );
+			my $description = Encode::decode_utf8( scalar $cgi->param( 'description' ) );
+			my $realname = Encode::decode_utf8( scalar $cgi->param( 'realname' ) );
 
 			$panel->add_error( gettext('You must enter a description') ) unless defined $description and $description !~ /^\s*$/;
 			$panel->add_error( gettext('You must enter a full name') ) unless defined $realname and $realname !~ /^\s*$/;
@@ -762,7 +762,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext( 'Error. This group doesn\'t exists') });

Modified: trunk/vhffs-api/src/Vhffs/Panel/Mail.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Mail.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Mail.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -95,7 +95,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -109,7 +109,7 @@
 
 	if( $submitted ) {
 		$domain = $cgi->param('domain');
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 		unless( defined $domain and defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
 		} else {
@@ -308,7 +308,7 @@
 	}
 
 	# User wants to update information about a localpart
-	my $lp = $mail->get_localpart( $cgi->param('localpart') );
+	my $lp = $mail->get_localpart( scalar $cgi->param('localpart') );
 	my $passwd = $cgi->param('localpart_password');
 	my $use_antispam = $cgi->param('use_antispam');
 	my $use_antivirus = $cgi->param('use_antivirus');
@@ -466,7 +466,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') } );
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/MailingList.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/MailingList.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/MailingList.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -128,7 +128,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify($group) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -148,7 +148,7 @@
 	if( $submitted ) {
 		my $localpart = $cgi->param( 'localpart' );
 		my $domain = $cgi->param( 'domain' );
-		my $description = Encode::decode_utf8( $cgi->param( 'description' ) );
+		my $description = Encode::decode_utf8( scalar $cgi->param( 'description' ) );
 		my $mail;
 
 		unless( defined $localpart and defined $domain and defined $description ) {
@@ -246,10 +246,10 @@
 	my $cgi = $panel->{'cgi'};
 	my $user = $panel->{'user'};
 
-	my $prefix = Encode::decode_utf8( $cgi->param('prefix') );
+	my $prefix = Encode::decode_utf8( scalar $cgi->param('prefix') );
 	my $sub_ctrl = $cgi->param('subscribe_control');
 	my $post_ctrl = $cgi->param('posting_control');
-	my $sig = Encode::decode_utf8( $cgi->param('signature') );
+	my $sig = Encode::decode_utf8( scalar $cgi->param('signature') );
 
 	unless( $user->can_modify($list) ) {
 		$panel->add_error( gettext( 'You\'re not allowed to do this, object is not in active state or you don\'t have enough ACL rights' ) );
@@ -388,7 +388,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group ) {
 		$panel->render( 'misc/message.tt', { message => gettext('You have to select a group first') } );
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/Mercurial.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Mercurial.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Mercurial.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -124,7 +124,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -139,7 +139,7 @@
 	if( $submitted ) {
 		$reponame = $cgi->param('reponame');
 		my $fullreponame = $group->get_groupname.'/'.$reponame;
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 		unless( defined $reponame and defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
 		} else {
@@ -264,7 +264,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group ) {
 		$panel->render_template('misc/message.tt', { message => gettext('You have to select a group first') } );
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/Moderation.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Moderation.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Moderation.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -58,7 +58,7 @@
 	if(defined $accept or defined $refuse) {
 		# Submitted
 		my $oid = $cgi->param('oid');
-		my $message = Encode::decode_utf8( $cgi->param('message') );
+		my $message = Encode::decode_utf8( scalar $cgi->param('message') );
 
 		unless(defined $oid and defined $message) {
 			$panel->render('misc/message.tt', { message => gettext( 'CGI Error !' ) } );

Modified: trunk/vhffs-api/src/Vhffs/Panel/Mysql.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Mysql.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Mysql.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -121,7 +121,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -139,7 +139,7 @@
 		my $dbname = $group->get_groupname.'_'.$dbsuffix;
 		my $dbuser = $dbname;
 		$dbpass = $cgi->param('db_pass');
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 
 		unless( defined $dbpass and defined $dbsuffix and defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
@@ -246,7 +246,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') } );

Modified: trunk/vhffs-api/src/Vhffs/Panel/Object.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Object.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Object.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -67,7 +67,7 @@
 	my $user = $panel->{'user'};
 
 	require Vhffs::Object;
-	my $object = Vhffs::Object::get_by_oid( $vhffs , $cgi->param('oid') );
+	my $object = Vhffs::Object::get_by_oid( $vhffs , scalar $cgi->param('oid') );
 	unless( defined $object ) {
 		$panel->render('misc/message.tt', { message => gettext( 'Cannot get information on this object') });
 		return;
@@ -117,7 +117,7 @@
 
 	my $submitted = defined $cgi->param('submitted');
 	if( $submitted ) {
-		my $description = Encode::decode_utf8( $cgi->param('description') );
+		my $description = Encode::decode_utf8( scalar $cgi->param('description') );
 		unless( defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
 			return;
@@ -280,7 +280,7 @@
 
 	my $oid = $cgi->param('oid');
 	my $status = $cgi->param('status');
-	my $description = Encode::decode_utf8( $cgi->param('description') );
+	my $description = Encode::decode_utf8( scalar $cgi->param('description') );
 
 	unless(defined $oid) {
 		$panel->render('misc/message.tt', {

Modified: trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Pgsql.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -111,7 +111,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -129,7 +129,7 @@
 		my $dbname = $group->get_groupname.'_'.$dbsuffix;
 		my $dbuser = $dbname;
 		$dbpass = $cgi->param('db_pass');
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 
 		unless( defined $dbpass and defined $dbsuffix and defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
@@ -236,7 +236,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') } );

Modified: trunk/vhffs-api/src/Vhffs/Panel/Public.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Public.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Public.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -128,9 +128,9 @@
 	@included_tags_ids = grep { $_ != $discard_included } @included_tags_ids if(defined $discard_included);
 
 	if( defined $cgi->param('groupname') and defined $cgi->param('description') ) {
-		my $groupname = Encode::decode_utf8($cgi->param('groupname'));
+		my $groupname = Encode::decode_utf8(scalar $cgi->param('groupname'));
 		$groupname = '' unless(defined $groupname);		# Direct tag click brings us here without  without groupname ...
-		my $description = Encode::decode_utf8($cgi->param('description'));
+		my $description = Encode::decode_utf8(scalar $cgi->param('description'));
 		$description = '' unless(defined $description);	# ... and without description
 
 		# current page
@@ -287,7 +287,7 @@
 	my $cgi = $panel->{cgi};
 
 	if( defined $cgi->param('username') ) {
-		my $username = Encode::decode_utf8($cgi->param('username'));
+		my $username = Encode::decode_utf8(scalar $cgi->param('username'));
 		my $page = defined($cgi->param('page')) ? int($cgi->param('page')) : 1;
 
 		if($username =~ /^\s*$/) {
@@ -358,7 +358,7 @@
 	my $panel = shift;
 	my $cgi = $panel->{cgi};
 
-	my $search = Encode::decode_utf8($cgi->param('search'));
+	my $search = Encode::decode_utf8(scalar $cgi->param('search'));
 	unless( defined $search ) {
 		$panel->render('common/error.tt', {
 			message => gettext('CGI Error!')

Modified: trunk/vhffs-api/src/Vhffs/Panel/Repository.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Repository.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Repository.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -111,7 +111,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render( 'misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -123,7 +123,7 @@
 	my $vars = {};
 
 	if( $submitted ) {
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 
 		unless( defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
@@ -218,7 +218,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') } );
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/Subscribe.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Subscribe.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Subscribe.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -72,12 +72,12 @@
 		# get filled in parameters
 		my $mail       = $cgi->param('mail');
 		my $username   = $cgi->param('username');
-		my $firstname  = Encode::decode_utf8( $cgi->param('firstname') );
-		my $lastname   = Encode::decode_utf8( $cgi->param('lastname') );
-		my $city       = Encode::decode_utf8( $cgi->param('city') );
-		my $zipcode    = Encode::decode_utf8( $cgi->param('zipcode') );
-		my $country    = Encode::decode_utf8( $cgi->param('country') );
-		my $address    = Encode::decode_utf8( $cgi->param('address') );
+		my $firstname  = Encode::decode_utf8( scalar $cgi->param('firstname') );
+		my $lastname   = Encode::decode_utf8( scalar $cgi->param('lastname') );
+		my $city       = Encode::decode_utf8( scalar $cgi->param('city') );
+		my $zipcode    = Encode::decode_utf8( scalar $cgi->param('zipcode') );
+		my $country    = Encode::decode_utf8( scalar $cgi->param('country') );
+		my $address    = Encode::decode_utf8( scalar $cgi->param('address') );
 		my $newslettercheckbox = $cgi->param('newsletter');
 		$newslettercheckbox = ( defined $newslettercheckbox and $newslettercheckbox eq 'on' );
 

Modified: trunk/vhffs-api/src/Vhffs/Panel/Svn.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Svn.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Svn.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -123,7 +123,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render( 'misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) });
 		return;
@@ -138,7 +138,7 @@
 	if( $submitted ) {
 		$reponame = $cgi->param('reponame');
 		my $fullreponame = $group->get_groupname.'/'.$reponame;
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 
 		unless( defined $reponame && defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
@@ -258,7 +258,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group ) {
 		$panel->render('misc/message.tt', { message => gettext('You have to select a group first') });
 		return;

Modified: trunk/vhffs-api/src/Vhffs/Panel/Tag.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Tag.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Tag.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -382,7 +382,7 @@
 		return;
 	}
 
-	unless( defined ( $tag = Vhffs::Tag::get_by_tag_id($panel->{vhffs}, $cgi->param('tag_id')) ) ) {
+	unless( defined ( $tag = Vhffs::Tag::get_by_tag_id($panel->{vhffs}, scalar $cgi->param('tag_id')) ) ) {
 		$panel->render('misc/message.tt', { message => gettext('Tag not found!') } );
 		return;
 	}
@@ -458,7 +458,7 @@
 		return;
 	}
 
-	unless( defined( $category = Vhffs::Tag::Category::get_by_category_id($panel->{vhffs}, $cgi->param('category_id')) ) ) {
+	unless( defined( $category = Vhffs::Tag::Category::get_by_category_id($panel->{vhffs}, scalar $cgi->param('category_id')) ) ) {
 		$panel->render('misc/message.tt', { message => gettext('Category not found!') } );
 		return;
 	}
@@ -561,10 +561,10 @@
 			return;
 		}
 
-		$vars->{category_label} = $cgi->param('category_label');
-		$vars->{category_description} = $cgi->param('category_description');
-		$vars->{tag_label} = $cgi->param('tag_label');
-		$vars->{tag_description} = $cgi->param('tag_description');
+		$vars->{category_label} = scalar $cgi->param('category_label');
+		$vars->{category_description} = scalar $cgi->param('category_description');
+		$vars->{tag_label} = scalar $cgi->param('tag_label');
+		$vars->{tag_description} = scalar $cgi->param('tag_description');
 	}
 
 	if(defined $cgi->param('discard_request_submit')) {

Modified: trunk/vhffs-api/src/Vhffs/Panel/User.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/User.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/User.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -252,12 +252,12 @@
 			$panel->add_error( gettext( 'You\'re not allowed to do this, object is not in active state or you don\'t have enough ACL rights' ) );
 		} else {
 			my $mail = $cgi->param( 'mail' );
-			my $firstname = Encode::decode_utf8( $cgi->param( 'firstname' ) );
-			my $lastname = Encode::decode_utf8( $cgi->param( 'lastname' ) );
-			my $city = Encode::decode_utf8( $cgi->param( 'city' ) );
-			my $zipcode = Encode::decode_utf8( $cgi->param( 'zipcode' ) );
-			my $country = Encode::decode_utf8( $cgi->param( 'country' ) );
-			my $address = Encode::decode_utf8( $cgi->param( 'address' ) );
+			my $firstname = Encode::decode_utf8( scalar $cgi->param( 'firstname' ) );
+			my $lastname = Encode::decode_utf8( scalar $cgi->param( 'lastname' ) );
+			my $city = Encode::decode_utf8( scalar $cgi->param( 'city' ) );
+			my $zipcode = Encode::decode_utf8( scalar $cgi->param( 'zipcode' ) );
+			my $country = Encode::decode_utf8( scalar $cgi->param( 'country' ) );
+			my $address = Encode::decode_utf8( scalar $cgi->param( 'address' ) );
 			my $pass1 = $cgi->param( 'password1' );
 			my $pass2 = $cgi->param( 'password2' );
 			my $theme = $cgi->param( 'theme' );

Modified: trunk/vhffs-api/src/Vhffs/Panel/Web.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Web.pm	2014-07-16 09:31:20 UTC (rev 2248)
+++ trunk/vhffs-api/src/Vhffs/Panel/Web.pm	2014-10-12 21:12:09 UTC (rev 2249)
@@ -185,7 +185,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined $group and $user->can_modify( $group ) ) {
 		$panel->render('misc/message.tt', { message => gettext( 'You\'re not allowed to do this (ACL rights)' ) } );
 		return;
@@ -199,7 +199,7 @@
 
 	if( $submitted ) {
 		$servername = $cgi->param('servername');
-		$description = Encode::decode_utf8( $cgi->param('description') );
+		$description = Encode::decode_utf8( scalar $cgi->param('description') );
 		unless( defined $servername and defined $description ) {
 			$panel->add_error( gettext('CGI Error !') );
 		} else {
@@ -275,7 +275,7 @@
 	my $cgi = $panel->{'cgi'};
 	my $user = $panel->{'user'};
 
-	my $description = Encode::decode_utf8( $cgi->param('description') );
+	my $description = Encode::decode_utf8( scalar $cgi->param('description') );
 
 	unless( $user->can_modify($web) ) {
 		$panel->add_error( gettext('You are not allowed to modify this web area') );
@@ -307,7 +307,7 @@
 	my $session = $panel->{'session'};
 	my $user = $panel->{'user'};
 
-	my $group = Vhffs::Group::get_by_groupname( $vhffs , $cgi->param('group') );
+	my $group = Vhffs::Group::get_by_groupname( $vhffs , scalar $cgi->param('group') );
 	unless( defined($group) ) {
 		$panel->render( 'misc/message.tt', { message => gettext('You have to select a group first') });
 		return;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/