Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 72882
Status: resolved
Worked: 5 min
Priority: 0/
Queue: CGI

Owner: Nobody in particular
Requestors: perl [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)


Download (untitled) / with headers
text/plain 777b
With some calls the pattern match in "user_agent" seems to be uninitilized. Use of uninitialized value in pattern match (m//) at (eval 923) line 4. at (eval 923) line 4 CGI::user_agent('MSIE\s+3\.0[12];\s*Mac|DreamPassport') called at (eval 922) line 15 MultipartBuffer::new('MultipartBuffer', 'CGI=HASH(0x25bfd40)', '---------------------8ce7d315bde28d1', 585) called at (eval 920) line 4 CGI::new_MultipartBuffer('CGI=HASH(0x25bfd40)', '---------------------8ce7d315bde28d1', 585) called at (eval 919) line 3 CGI::read_multipart('CGI=HASH(0x25bfd40)', '---------------------8ce7d315bde28d1', 585) called at /usr/share/perl/5.10/ line 553 CGI::init('CGI=HASH(0x25bfd40)') called at /usr/share/perl/5.10/ line 370 CGI::new('CGI') called at
Subject: Problem with user_agent and undefined pattern
A patch checking wether match is defined before checking for its contents
Subject: 0001-user_agent-regular-expressions-are-now-also-checked-.patch
From 1369abd9b4ebbea3b7274341bb875facf60f1dbb Mon Sep 17 00:00:00 2001 From: gooroo175 <> Date: Thu, 1 Dec 2011 10:01:15 +0100 Subject: [PATCH] user_agent regular expressions are now also checked for being defined. This threw an unnecessary warning. --- lib/ | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/ b/lib/ index 9138fe1..0b21b84 100644 --- a/lib/ +++ b/lib/ @@ -3167,7 +3167,7 @@ END_OF_FUNC sub user_agent { my($self,$match)=self_or_CGI(@_); my $user_agent = $self->http('user_agent'); - return $user_agent unless $match && $user_agent; + return $user_agent unless defined $match && $match && $user_agent; return $user_agent =~ /$match/i; } END_OF_FUNC -- 1.7.4.msysgit.0
Subject: Re: [ #72882] Problem with user_agent and undefined pattern
Date: Fri, 02 Dec 2011 08:54:15 -0500
To: [...]
From: Mark Stosberg <mark [...]>
Download (untitled) / with headers
text/plain 139b
Thanks. There is a duplicate report for somewhere that was just waiting for the patch. I'll find that ticket, merge and release this fix.
Thanks, I'm committing this patch to Git today. Mark

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to