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: 83719
Status: rejected
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: konop039 [...] umn.edu
Cc:
AdminCc:

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



X-Umn-Classification: local
From konop039 [...] umn.edu Fri Mar 1 15: 51:51 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5] autolearn=ham
X-Mailer: Microsoft Outlook 14.0
X-Umn-Remote-Mta: [N] mail-ia0-f200.google.com [209.85.210.200] #+LO+TR
X-Spam-Flag: NO
Content-Type: multipart/alternative; boundary=e89a8ff1c2c26733ed04d6e32c4e
Message-ID: <461b6cbdeb774f24eddf030762947bd0 [...] mail.gmail.com>
X-Received: by 10.60.30.231 with SMTP id v7mr9752679oeh.118.1362171097912; Fri, 01 Mar 2013 12:51:37 -0800 (PST)
X-Received: by 10.60.30.231 with SMTP id v7mr9752674oeh.118.1362171097718; Fri, 01 Mar 2013 12:51:37 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -6.899
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 6F9E924069C for <cpan-bug+CGI [...] hipster.bestpractical.com>; Fri, 1 Mar 2013 15:51:51 -0500 (EST)
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 skvMA5qJX-6i for <cpan-bug+CGI [...] hipster.bestpractical.com>; Fri, 1 Mar 2013 15:51:49 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 1D1292403E7 for <bug-CGI [...] rt.cpan.org>; Fri, 1 Mar 2013 15:51:48 -0500 (EST)
Received: (qmail 26393 invoked by uid 103); 1 Mar 2013 20:51:48 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 1 Mar 2013 20:51:48 -0000
Received: from vs-m.tc.umn.edu (HELO vs-m.tc.umn.edu) (134.84.135.97) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Fri, 01 Mar 2013 12:51:41 -0800
Received: from mail-ia0-f200.google.com (mail-ia0-f200.google.com [209.85.210.200]) by vs-m.tc.umn.edu (UMN smtpd) with ESMTP for <bug-CGI [...] rt.cpan.org>; Fri, 1 Mar 2013 14:51:38 -0600 (CST)
Received: by mail-ia0-f200.google.com with SMTP id u20so13559216iag.7 for <bug-CGI [...] rt.cpan.org>; Fri, 01 Mar 2013 12:51:38 -0800 (PST)
Delivered-To: cpan-bug+CGI [...] hipster.bestpractical.com
Subject: hidden() does not assign the given value to the named element
Return-Path: <konop039 [...] umn.edu>
Thread-Index: Ac4WvnnfaqXLk9fsS2a+XLaeSz0znQ==
X-RT-Mail-Extension: cgi
X-Original-To: cpan-bug+CGI [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:from:mime-version:x-mailer:thread-index:date :message-id:subject:to:content-type:x-gm-message-state; bh=2q75sr7y+MqZMq4B4AgAMd/MqDK8oZCUFfV/9ulBpbE=; b=Ux0odwKV3yeUIVsDFUtEC6jaQMUMmRwn03DYvaNoVUJ8Mfw1hpcG3l+FA3XCo9zy/e chw6PmeyDlauROMGfWsxZyNqQguhfDSCuSIya7fBMN1MaGuUYglIqlGKZXc4BcVgYWsl EseS481/7At0RthYzpgw0VEEfAm0O0oyqx5FDXoZksw23n8TlLW9s0fawg8duG9YWx7V dTqGU5kNHdfNxsuW3JQnprMNRtttr7M8QZxCcJYbteH+PxvCMd5Emgg820DVHXFo2WkJ 9fu0muqbMcNBe6yemf4ylY0URbCdKHrTffmRKBT4c9p94zB13DUsBldXoHquQMhqfgih DjcA==
Date: Fri, 1 Mar 2013 14:51:36 -0600
X-Spam-Level:
To: bug-CGI [...] rt.cpan.org
X-GM-Message-State: ALoCoQnBvxTtaBCaStAXe/DsT9M4gBHiuoYOpbx9bWHhgnjvTfbba50j15gwk9M2Y0N1Upt6ejZ/ZdWera97an4I4sebdETICHOjU1+YPmLjCxcjJw7hgizsR95cMr6ymDEVyB+wb9IUMWE17DrAyfgqTZmP57Vn3Q==
From: Dmitry Konopatski <konop039 [...] umn.edu>
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 1264
Download (untitled) / with headers
text/plain 1.2k
#!/usr/bin/perl # bug-CGI [at] rt.cpan.org =pod Hi, Using the following scenario I am trying to create a hidden input "weather" with an explicitly assigned value of "exciting". The problem is that my input will be assigned a different value of "dull" which comes in the body of the HTTP request. I have not had a chance to come up with a patch, but I am sending you a test script that would allow you to reproduce the issue for the recent versions of CGI.pm Thanks, Dmitry Konopatski =cut BEGIN { use strict; use warnings; use lib qw(lib ../lib); use Test::More; } use CGI; my ($name, $val, $newval) = ("weather", "dull", "exciting"); my $q = CGI->new("$name=$val"); ok(($a = $q->hidden($name, $newval)) !~ /\Q$newval\E/i, $a); ok(($a = $q->hidden($name, $newval)) =~ /\Q$val\E/i, $a); ok(($b = $q->hidden(-name => $name, -default => $newval)) !~ /\Q$newval\E/i, $b); ok(($b = $q->hidden(-name => $name, -default => $newval)) =~ /\Q$val\E/i, $b); ok($a eq $b, "HTML is the same"); ok(($a = $q->hidden(-name => $name, -default => $q->param("weather", $newval))) =~ /\Q$newval\E/i, "Workaround 1"); ok(($b = $q->input({type => "hidden", name => $name, value => $newval})) =~ /\Q$newval\E/i, "Workaround 2"); done_testing();
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 3903
From mark [...] summersault.com Thu Mar 7 16: 39:35 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.203 tagged_above=-99.9 required=10 tests=[AWL=0.032, BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_SOFTFAIL=0.665] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-16300-1362171113-579.83719-4-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-83719 [...] rt.cpan.org> <461b6cbdeb774f24eddf030762947bd0 [...] mail.gmail.com> <rt-3.8.HEAD-16300-1362171113-579.83719-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <5139090E.9080201 [...] summersault.com>
Content-Type: text/plain; charset=UTF-8
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.203
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id B573C61E0E3 for <cpan-bug+cgi [...] hipster.bestpractical.com>; Thu, 7 Mar 2013 16:39:35 -0500 (EST)
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 f43k42Z7R0wL for <cpan-bug+cgi [...] hipster.bestpractical.com>; Thu, 7 Mar 2013 16:39:34 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 6B52261E0D9 for <bug-cgi [...] rt.cpan.org>; Thu, 7 Mar 2013 16:39:34 -0500 (EST)
Received: (qmail 29628 invoked by uid 103); 7 Mar 2013 21:39:33 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 7 Mar 2013 21:39:33 -0000
Received: from tanagra.summersault.com (HELO tanagra.summersault.com) (12.161.105.149) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Thu, 07 Mar 2013 13:39:31 -0800
Received: (qmail 92017 invoked from network); 7 Mar 2013 21:39:27 -0000
Received: from simba.summersault.com (HELO ?192.168.97.182?) (192.168.97.182) by tanagra.summersault.com with SMTP; 7 Mar 2013 21:39:27 -0000
Delivered-To: cpan-bug+cgi [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3
Subject: Re: [rt.cpan.org #83719] hidden() does not assign the given value to the named element
Return-Path: <mark [...] summersault.com>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+cgi [...] hipster.bestpractical.com
X-RT-Mail-Extension: cgi
Date: Thu, 07 Mar 2013 16:39:26 -0500
X-Spam-Level:
To: bug-cgi [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Mark Stosberg <mark [...] summersault.com>
RT-Message-ID: <rt-3.8.HEAD-32024-1362692376-102.83719-0-0 [...] rt.cpan.org>
Content-Length: 144
Download (untitled) / with headers
text/plain 144b
You've run into the documented "sticky" behavior. See -nosticky in the docs for more detail about the feature and how to disable it. Mark


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.