File: fix-more-warnings.patch

package info (click to toggle)
libcgi-application-plugin-authentication-perl 0.20-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,244 kB
  • ctags: 351
  • sloc: perl: 5,550; sh: 33; makefile: 8
file content (72 lines) | stat: -rw-r--r-- 3,099 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Description: [PATCH] Silent various warnings
 Some of them fail tests which sniffs for warnings. Some warning were
 introduced by CGI 4.05 or recent (5.20) perl.

 This is the same patch from the upstream tracker except the block that matched 
 the other CGI.pm patch was removed.

Origin: other, https://rt.cpan.org/Ticket/Attachment/1495484/796570/CGI-Application-Plugin-Authentication-0.20-Silent-various-warnings.patch
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=99460
Bug-Debian: https://bugs.debian.org/786447
Author: Petr Písař <ppisar@redhat.com>
---
 lib/CGI/Application/Plugin/Authentication.pm                     | 1 +
 lib/CGI/Application/Plugin/Authentication/Driver/Filter/crypt.pm | 2 +-
 lib/CGI/Application/Plugin/Authentication/Driver/Filter/md5.pm   | 2 +-
 lib/CGI/Application/Plugin/Authentication/Driver/Filter/sha1.pm  | 2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/CGI/Application/Plugin/Authentication.pm b/lib/CGI/Application/Plugin/Authentication.pm
index 83230d2..2908925 100644
--- a/lib/CGI/Application/Plugin/Authentication.pm
+++ b/lib/CGI/Application/Plugin/Authentication.pm
@@ -767,6 +767,7 @@ sub is_protected_runmode {
     my $self = shift;
     my $runmode = shift;
 
+    require overload;
     foreach my $runmode_test ($self->protected_runmodes) {
         if (overload::StrVal($runmode_test) =~ /^Regexp=/) {
             # We were passed a regular expression
diff --git a/lib/CGI/Application/Plugin/Authentication/Driver/Filter/crypt.pm b/lib/CGI/Application/Plugin/Authentication/Driver/Filter/crypt.pm
index 48dd28d..07377d4 100644
--- a/lib/CGI/Application/Plugin/Authentication/Driver/Filter/crypt.pm
+++ b/lib/CGI/Application/Plugin/Authentication/Driver/Filter/crypt.pm
@@ -15,7 +15,7 @@ sub check {
 
 sub filter {
     my $class = shift;
-    my $param = lc shift; # not used
+    shift; # not used
     my $plain = shift;
     my $salt  = shift;
     if (!$salt) {
diff --git a/lib/CGI/Application/Plugin/Authentication/Driver/Filter/md5.pm b/lib/CGI/Application/Plugin/Authentication/Driver/Filter/md5.pm
index 4b51ecf..56a0bea 100644
--- a/lib/CGI/Application/Plugin/Authentication/Driver/Filter/md5.pm
+++ b/lib/CGI/Application/Plugin/Authentication/Driver/Filter/md5.pm
@@ -25,7 +25,7 @@ sub check {
 
 sub filter {
     my $class = shift;
-    my $param = lc shift || 'hex';
+    my $param = lc( shift || 'hex' );
     my $plain = shift;
 
     Digest::MD5->require || die "Digest::MD5 is required to check MD5 passwords";
diff --git a/lib/CGI/Application/Plugin/Authentication/Driver/Filter/sha1.pm b/lib/CGI/Application/Plugin/Authentication/Driver/Filter/sha1.pm
index 610e9fa..b9f2f24 100644
--- a/lib/CGI/Application/Plugin/Authentication/Driver/Filter/sha1.pm
+++ b/lib/CGI/Application/Plugin/Authentication/Driver/Filter/sha1.pm
@@ -25,7 +25,7 @@ sub check {
 
 sub filter {
     my $class = shift;
-    my $param = lc shift || 'hex';
+    my $param = lc( shift || 'hex' );
     my $plain = shift;
 
     Digest::SHA->require || die "Digest::SHA is required to check SHA1 passwords";
-- 
2.1.0