File: silence-test-warnings

package info (click to toggle)
libcgi-application-server-perl 0.063-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 220 kB
  • ctags: 26
  • sloc: perl: 621; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 770 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Silence test warnings with newer CGI.pm versions

This fixes warnings like
  CGI::param called in list context from package ReplaceQueryObject line 14, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 436, <DATA> line 16.

Bug: https://rt.cpan.org/Public/Bug/Display.html?id=104176
Bug-Debian: https://bugs.debian.org/783405
--- libcgi-application-server-perl.orig/t/lib/ReplaceQueryObject.pm
+++ libcgi-application-server-perl/t/lib/ReplaceQueryObject.pm
@@ -12,7 +12,7 @@
     my ($self) = @_;
     my $q = $self->query;
     return join "\n",
-        $q->start_html($q->param('text')) .
+        $q->start_html(scalar $q->param('text')) .
         $q->end_html
     ;
 }