Commit 9ab537a5 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 304044: Missing scalar() for some parameters - Patch by Frédéric Buclin…

Bug 304044: Missing scalar() for some parameters - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
parent dddc17ec
...@@ -265,9 +265,7 @@ sub plot { ...@@ -265,9 +265,7 @@ sub plot {
validateWidthAndHeight(); validateWidthAndHeight();
$vars->{'chart'} = new Bugzilla::Chart($cgi); $vars->{'chart'} = new Bugzilla::Chart($cgi);
my $format = &::GetFormat("reports/chart", my $format = &::GetFormat("reports/chart", "", scalar($cgi->param('ctype')));
"",
$cgi->param('ctype'));
# Debugging PNGs is a pain; we need to be able to see the error messages # Debugging PNGs is a pain; we need to be able to see the error messages
if ($cgi->param('debug')) { if ($cgi->param('debug')) {
......
...@@ -269,9 +269,8 @@ foreach my $field ("dependson", "blocked") { ...@@ -269,9 +269,8 @@ foreach my $field ("dependson", "blocked") {
# Gather the dependency list, and make sure there are no circular refs # Gather the dependency list, and make sure there are no circular refs
my %deps; my %deps;
if (UserInGroup("editbugs")) { if (UserInGroup("editbugs")) {
%deps = Bugzilla::Bug::ValidateDependencies($cgi->param('dependson'), %deps = Bugzilla::Bug::ValidateDependencies(scalar($cgi->param('dependson')),
$cgi->param('blocked'), scalar($cgi->param('blocked')));
undef);
} }
# get current time # get current time
......
...@@ -1288,8 +1288,8 @@ foreach my $id (@idlist) { ...@@ -1288,8 +1288,8 @@ foreach my $id (@idlist) {
} }
if (defined $cgi->param('delta_ts') && $cgi->param('delta_ts') ne $delta_ts) if (defined $cgi->param('delta_ts') && $cgi->param('delta_ts') ne $delta_ts)
{ {
($vars->{'operations'}) = Bugzilla::Bug::GetBugActivity($cgi->param('id'), ($vars->{'operations'}) =
$cgi->param('delta_ts')); Bugzilla::Bug::GetBugActivity($id, $cgi->param('delta_ts'));
$vars->{'start_at'} = $cgi->param('longdesclength'); $vars->{'start_at'} = $cgi->param('longdesclength');
...@@ -1310,8 +1310,8 @@ foreach my $id (@idlist) { ...@@ -1310,8 +1310,8 @@ foreach my $id (@idlist) {
} }
# Gather the dependency list, and make sure there are no circular refs # Gather the dependency list, and make sure there are no circular refs
my %deps = Bugzilla::Bug::ValidateDependencies($cgi->param('dependson'), my %deps = Bugzilla::Bug::ValidateDependencies(scalar($cgi->param('dependson')),
$cgi->param('blocked'), scalar($cgi->param('blocked')),
$id); $id);
# #
...@@ -1335,8 +1335,8 @@ foreach my $id (@idlist) { ...@@ -1335,8 +1335,8 @@ foreach my $id (@idlist) {
} }
if ($cgi->param('comment') || $work_time) { if ($cgi->param('comment') || $work_time) {
AppendComment($id, $whoid, $cgi->param('comment'), AppendComment($id, $whoid, scalar($cgi->param('comment')),
$cgi->param('commentprivacy'), $timestamp, $work_time); scalar($cgi->param('commentprivacy')), $timestamp, $work_time);
$bug_changed = 1; $bug_changed = 1;
} }
......
...@@ -293,7 +293,7 @@ else { ...@@ -293,7 +293,7 @@ else {
ThrowUserError("unknown_action", {action => $cgi->param('action')}); ThrowUserError("unknown_action", {action => $cgi->param('action')});
} }
my $format = GetFormat("reports/report", $formatparam, $cgi->param('ctype')); my $format = GetFormat("reports/report", $formatparam, scalar($cgi->param('ctype')));
# If we get a template or CGI error, it comes out as HTML, which isn't valid # If we get a template or CGI error, it comes out as HTML, which isn't valid
# PNG data, and the browser just displays a "corrupt PNG" message. So, you can # PNG data, and the browser just displays a "corrupt PNG" message. So, you can
......
...@@ -76,12 +76,11 @@ sub SaveAccount { ...@@ -76,12 +76,11 @@ sub SaveAccount {
if ($cgi->param('Bugzilla_password') ne "" || if ($cgi->param('Bugzilla_password') ne "" ||
$pwd1 ne "" || $pwd2 ne "") $pwd1 ne "" || $pwd2 ne "")
{ {
my $old = SqlQuote($cgi->param('Bugzilla_password'));
SendSQL("SELECT cryptpassword FROM profiles WHERE userid = $userid"); SendSQL("SELECT cryptpassword FROM profiles WHERE userid = $userid");
my $oldcryptedpwd = FetchOneColumn(); my $oldcryptedpwd = FetchOneColumn();
$oldcryptedpwd || ThrowCodeError("unable_to_retrieve_password"); $oldcryptedpwd || ThrowCodeError("unable_to_retrieve_password");
if (crypt($cgi->param('Bugzilla_password'), $oldcryptedpwd) ne if (crypt(scalar($cgi->param('Bugzilla_password')), $oldcryptedpwd) ne
$oldcryptedpwd) $oldcryptedpwd)
{ {
ThrowUserError("old_password_incorrect"); ThrowUserError("old_password_incorrect");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment