Skip Menu |
 

This queue is for tickets about the Apache-ASP CPAN distribution.

Report information
The Basics
Id: 124555
Status: open
Priority: 0/
Queue: Apache-ASP

People
Owner: Nobody in particular
Requestors: bitcardbmw [...] lsmod.de
Cc:
AdminCc:

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



Subject: timegm should be called with 4-digit year
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-28640-1519400381-1904.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 278
Download (untitled) / with headers
text/plain 278b
man Time::Local says Whenever possible, use an absolute four digit year instead. With a detailed explanation about ambiguity of 2-digit years above that. Also, dont fail after 2038, because we have 64bit systems now. Please review/test/merge the attached patch (not tested)
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-28640-1519400381-1904.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: API
References: <rt-4.0.18-28640-1519400381-1904.0-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1519400610-28640-3"
Message-ID: <rt-4.0.18-28640-1519400610-66.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.18-28640-1519400610-1490.124555-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
From: bitcardbmw [...] lsmod.de
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 21
added forgotten patch
MIME-Version: 1.0
Subject: fix.patch
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Type: text/x-patch; name="fix.patch"
Content-Disposition: inline; filename="fix.patch"
Content-Transfer-Encoding: binary
Content-Length: 1129
Download fix.patch
text/x-diff 1.1k
Index: Apache-ASP-2.62/lib/Apache/ASP/Date.pm =================================================================== --- Apache-ASP-2.62.orig/lib/Apache/ASP/Date.pm +++ Apache-ASP-2.62/lib/Apache/ASP/Date.pm @@ -167,15 +167,15 @@ sub str2time ($;$) # Then we check if the year is acceptable return undef if $yr > 99 && $yr < 1900; # We ignore these years $yr += 100 if $yr < 50; # a stupid thing to do??? - $yr -= 1900 if $yr >= 1900; - # The $yr is now relative to 1900 (as expected by timelocal()) + $yr += 1900 if $yr < 1000; + # The $yr is now absolute 4-digit (as expected by timelocal()) # timelocal() seems to go into an infinite loop if it is given out # of range parameters. Let's check the year at least. - # Epoch counter maxes out in year 2038, assuming "time_t" is 32 bit - return undef if $yr > 138; - return undef if $yr < 70; # 1970 is Unix epoch + # 32bit epoch counter maxes out in year 2038, but "time_t" is 64 bit on most systems now + #return undef if $yr > 2038; + return undef if $yr < 1970; # 1970 is Unix epoch # Compensate for AM/PM if ($aorp) {
MIME-Version: 1.0
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
content-type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.234
X-Google-SMTP-Source: AG47ELv/J9UEnMnPFJrjgTJCoQkHl77J97o/5KX+ehvYirxndbxkBSbzZwQosb7CU4oP2aGDBPWQUw==
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id CF21224023E for <cpan-bug+Apache-ASP [...] hipster.bestpractical.com>; Fri, 16 Mar 2018 01:56:41 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 35+G0WCd22eF for <cpan-bug+Apache-ASP [...] hipster.bestpractical.com>; Fri, 16 Mar 2018 01:56:40 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id C2FBB24011B for <bug-Apache-ASP [...] rt.cpan.org>; Fri, 16 Mar 2018 01:56:39 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 1991C11EB17 for <bug-Apache-ASP [...] rt.cpan.org>; Thu, 15 Mar 2018 22:56:38 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id AC03111EF36 for <bug-Apache-ASP [...] rt.cpan.org>; Thu, 15 Mar 2018 22:56:35 -0700 (PDT)
Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id 46AF111E08C for <bug-Apache-ASP [...] rt.cpan.org>; Thu, 15 Mar 2018 22:56:30 -0700 (PDT)
Received: by mail-io0-f174.google.com with SMTP id h23so11290411iob.11 for <bug-Apache-ASP [...] rt.cpan.org>; Thu, 15 Mar 2018 22:56:30 -0700 (PDT)
Received: from laptop-pro.local (c-73-158-103-234.hsd1.ca.comcast.net. [73.158.103.234]) by smtp.googlemail.com with ESMTPSA id p194sm2699790itp.44.2018.03.15.22.56.28 for <bug-Apache-ASP [...] rt.cpan.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 22:56:28 -0700 (PDT)
Delivered-To: cpan-bug+Apache-ASP [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #124555] timegm should be called with 4-digit year
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=c7NApmXbncHe0xW+wzjW81xy88d1nCd0FJUgF4ti9Iw=; b=AHvmimaijGeySXVjp5HEaXLS97IPXi+9eaI981T6uqoFWvYaLAwsilNXG96rLg6mzV 7ugiN6LKzu8wCh8y7J+gZOexXiLm86CO3lI3cELsdylLcLXlpVESkOe3we6eG8WZCcR2 wMbkIa3NoFxrzPQOdRsjoSQ0qKK2RPXPPh0ApAGGawfz+xoSmzsd+M8tcJjgd3ElA6rp abjh/ZYaVrRhqYZzPP4+ah3Jdg6GOVKfUuIv2Flyc991UeQqjiXu2B4Kg1SuVKClAcZh OXHS7r9R0AMS8mXGi9YzPpEcBUqAUhe4OXoocLHZTWn0oiNtkzVmWhzcUFOfbsv+2+Zm aASg==
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=c7NApmXbncHe0xW+wzjW81xy88d1nCd0FJUgF4ti9Iw=; b=KdqvBKKSpMJhO4/4wlenTld6a2xokttAmXc1Buj9v5m5OfZGg+5k2b6dMDB4b8MLEx nlrAP9fHkJfPM72/4RMQkUdUkgMl3+czUlT/dguKQsFFEZf56cDpNXPMtclQ7sh4zM8u TNYMJYZ/M9mgg09BWu7Eg0ZOVBlGLTCsTP0vQncP45OFZ7ViN337nmYXrqIpV2Jmx/4Q 2qNI/3ncxNopSc2N+idUl9fabu83QpFJ3jdXy3NSgtdeqXIqYXEFC/NqFf5+hEBdJuwz 5mmfVDkvPbosELD7mF2mXHs3UcxjWKDrWsxqQpJ0YLsl4avY7DEBScAgpCvAzmzMkoke hMjw==
Date: Thu, 15 Mar 2018 22:56:27 -0700
X-PMX-Spam: Gauge=X, Probability=10%, Report=' WEBMAIL_REPLYTO_NOT_FROM 0.5, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_400_499 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, DKIM_SIGNATURE 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, REFERENCES 0, SINGLE_URI_IN_BODY 0, SPF_PASS 0, URI_ENDS_IN_HTML 0, URI_WITH_PATH_ONLY 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FORWARDED_MSG 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_SENDER 0, __HAS_FROM 0, __HAS_MSGID 0, __HELO_GMAIL 0, __HTTPS_URI 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __NO_HTML_TAG_RAW 0, __PHISH_SPEAR_STRUCTURE_1 0, __PHISH_SPEAR_STRUCTURE_2 0, __RDNS_GMAIL 0, __REFERENCES 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __USER_AGENT 0, __YOUTUBE_RCVD 0, __blackholes.mail-abuse.org_TIMEOUT , __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2018.3.16.55116
To: bug-Apache-ASP [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
X-GM-Message-State: AElRT7GL06hCprkgnT3BcikqsE1+6imBcQyY2/jXj8bvvQZEnVe3nYV8 R4CY14egrTbdQvcgoabRq61hmJx+
In-Reply-To: <rt-4.0.18-28640-1519400610-786.124555-5-0 [...] rt.cpan.org>
X-Spam-Status: No, score=-5.234 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, FROM_OUR_RT=-4, SPF_SOFTFAIL=0.665] autolearn=ham
X-RT-Interface: API
Content-Language: en-US
References: <RT-Ticket-124555 [...] rt.cpan.org> <rt-4.0.18-28640-1519400381-1904.124555-5-0 [...] rt.cpan.org> <rt-4.0.18-28640-1519400610-786.124555-5-0 [...] rt.cpan.org>
Message-ID: <c7ec8843-0ac5-c1cb-9532-460cf44fdb6e [...] chamas.com>
X-Received: by 10.107.212.7 with SMTP id l7mr496784iog.70.1521179789486; Thu, 15 Mar 2018 22:56:29 -0700 (PDT)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
Return-Path: <josh.chamas [...] gmail.com>
X-RT-Mail-Extension: apache-asp
X-Original-To: cpan-bug+Apache-ASP [...] hipster.bestpractical.com
Sender: Josh Chamas <josh.chamas [...] gmail.com>
From: Josh Chamas <josh [...] chamas.com>
RT-Message-ID: <rt-4.0.18-17547-1521179802-1400.124555-0-0 [...] rt.cpan.org>
Content-Length: 448
Download (untitled) / with headers
text/plain 448b
Thank you for this bug report and patch! Its good to get future proof here. This code was taken from HTTP::Date before it was unbundled from libwww-perl, so I will start using that module directly and add the dependency in the next release 2.65. Thanks again! Josh On 2/23/18 7:43 AM, Bernhard M. W. via RT wrote: Show quoted text
> Queue: Apache-ASP > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=124555 > > > added forgotten patch >


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.