Hi Monks, I noticed an error in the logs while testing my CGI::Application.
GI::param called in list context from package CGI::Session line 364, t +his can lead to vulnerabilities. See the warning in "Fetching the val +ue or values of a single named parameter" at /Users/XXXXXX/perl5/perl +brew/perls/perl-5.10.1/lib/5.10.1/CGI.pm line 425., referer: http://c +ismun.local/cgi-bin/register.cgi
- update is that i have seen that setting the variable $CGI::Application::LIST_CONTEXT_WARN to 0 provides a way to prevent this noise in the server logs.

While the query parameters are getting saved successfully and the functonality seems to work fine, i need a tip on how to resolve this error/warning. Even if u can tell me what is the vulnerability of this statement would be good enough for now..even though I read the CGI docs . Is this suggesting a posisble data inconsistency ??! The line code in question that i see is causing this issue is commented below.
sub register_delegate{ my $self = shift; my $session = $self->session(); my $query = $self->query(); my $countries = createHTMLDropDown("../files/country_listv2.txt"); #clearing the session before writing new values. $session->clear(); #this line of code causes the error. # $session->save_param(); # $self->log->debug("after calling save param"); my %ret_params = ( 'session_id' => $session->id(), 'country_list_dd' => $countries, ); return $self->tt_process('dlg_register.tt',\%ret_params); }
I tried testing replacing it with the statement with the two options below, but the script dies without any output to the browser (blank page)and surprisingly even the debug statement is not appearing in the log file.
$session->save_param($query->param('s_addr')) or die $!;; and even
$session->save_param(scalar $query->param('s_addr')) or die $!;
but it still dies without an error message. Thanks in advance for any tips.
Do not wait to strike when the iron is hot! Make it hot by striking - WB Yeats

In reply to CGI::param called in list context from package by perlron

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.