#25676 [Opn]: Form hidden input ouput when any form=* is in url_rewriter.tags

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default #25676 [Opn]: Form hidden input ouput when any form=* is in url_rewriter.tags

    ID: 25676
    Updated by: [email]davey@php.net[/email]
    Reported By: [email]davey@php.net[/email]
    Status: Open
    Bug Type: Session related
    Operating System: WinXP/FreeBSD
    PHP Version: 4CVS-2003-09-26 (stable)
    New Comment:

    I've now had it confirmed on *two* Debian Linux boxes with a 20030927
    snapshot that the hidden element does NOT get output.

    Trying to confirm on other distros, versions of windows and newer FBSD
    versions now.

    Note: the "Expected Result" has the extraneous hidden input, please
    mentally remove that ;)

    - Davey


    Previous Comments:
    ------------------------------------------------------------------------

    [2003-09-27 08:36:22] [email]sniper@php.net[/email]

    RTFM "Note: If you want XHTML conformity, remove the form entry and
    use the <fieldset> tags around your form fields."

    ------------------------------------------------------------------------

    [2003-09-26 23:20:55] [email]davey@php.net[/email]

    Description:
    ------------
    Despite there being no form=fakeentry or form= (as I understand it,
    providing no value is the same as giving fakeentry) in
    url_rewriter.tags the form hidden element for the PHPSESSID is still
    output.

    I am trying to use form=action as the url_rewriter.tags and whilst this
    IS rewritten correctly, the hidden element is still being inserted. It
    seems that the fallback mechanism is faulty.

    This has been tested on several builds:
    PHP 4.3.3RC4 WinXP
    Latest Snapshot (200309270130) WinXP

    PHP 4.3.3 FreeBSD
    Latest Snapshot (200309270130) FreeBSD

    I have also had someone reporting the CORRECT behaviour on Debian with
    latest CVS so its quite the puzzle...

    - Davey

    Reproduce code:
    ---------------
    <?php
    session_start();
    setcookie('PHPSESSID','',0); /* needed if session.use_cookies is still
    on */
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <?php
    ini_set('url_rewriter.tags','a=href,area=href,fram e=src,input=src,form=action,foo=bar');
    echo ini_get("url_rewriter.tags") . "<br />";
    if(isset($_GET)) {
    var_dump($_GET);
    }
    ?>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
    <p>
    Foo: <input type="text" name="foo" value="" />
    <br />
    Bar: <input type="text" name="bar" value="" />
    <br />
    <input type="submit" value="Test!" />
    </p>
    <foo href="foo.php" bar="null" />
    </form>
    </body>
    </html>

    Expected result:
    ----------------
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled</title>
    </head>

    <body>
    a=href,area=href,frame=src,input=src,form=action,f oo=bar<br
    />array(0) {
    }
    <form
    action="/test/url_rewrite_form_action.php?PHPSESSID=6a5b43d2aef8 e2e3158e44fbd3df5d9d"
    method="get"><input type="hidden" name="PHPSESSID"
    value="6a5b43d2aef8e2e3158e44fbd3df5d9d" />
    <p>
    Foo: <input type="text" name="foo" value="" />
    <br />
    Bar: <input type="text" name="bar" value="" />
    <br />

    <input type="submit" value="Test!" />
    </p>
    <foo href="foo.php"
    bar="null?PHPSESSID=6a5b43d2aef8e2e3158e44fbd3df5d 9d" />
    </form>
    </body>
    </html>

    Actual result:
    --------------
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled</title>
    </head>

    <body>
    a=href,area=href,frame=src,input=src,form=action,f oo=bar<br
    />array(0) {
    }
    <form
    action="/test/url_rewrite_form_action.php?PHPSESSID=6a5b43d2aef8 e2e3158e44fbd3df5d9d"
    method="get"><input type="hidden" name="PHPSESSID"
    value="6a5b43d2aef8e2e3158e44fbd3df5d9d" />
    <p>
    Foo: <input type="text" name="foo" value="" />
    <br />
    Bar: <input type="text" name="bar" value="" />
    <br />

    <input type="submit" value="Test!" />
    </p>
    <foo href="foo.php"
    bar="null?PHPSESSID=6a5b43d2aef8e2e3158e44fbd3df5d 9d" />
    </form>
    </body>
    </html>


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=25676&edit=1[/url]
    davey@php.net Guest

  2. Similar Questions and Discussions

    1. Flash form with hidden field
      CF MX7 has nice flash form, but my question is, how could pass embedded hidden field like regular html form do? <cfinput type="hidden" name="">...
    2. #25676 [Opn->Bgs]: Form hidden input ouput when any form=* is in url_rewriter.tags
      ID: 25676 Updated by: sniper@php.net Reported By: davey@php.net -Status: Open +Status: Bogus Bug...
    3. #25676 [Bgs->Opn]: Form hidden input ouput when any form=* is in url_rewriter.tags
      ID: 25676 Updated by: davey@php.net Reported By: davey@php.net -Status: Bogus +Status: Open Bug...
    4. #25676 [NEW]: Form hidden input ouput when any form=* is in url_rewriter.tags
      From: davey@php.net Operating system: WinXP/FreeBSD PHP version: 4CVS-2003-09-26 (stable) PHP Bug Type: Session related Bug...
    5. #24963 [NEW]: url_rewriter.tags for JavaScript?
      From: thochgreve at php-resource dot de Operating system: any PHP version: Irrelevant PHP Bug Type: Feature/Change Request...
  3. #2

    Default #25676 [Opn]: Form hidden input ouput when any form=* is in url_rewriter.tags

    ID: 25676
    Updated by: [email]davey@php.net[/email]
    Reported By: [email]davey@php.net[/email]
    Status: Open
    Bug Type: Session related
    Operating System: WinXP/FreeBSD
    PHP Version: 4CVS-2003-09-26 (stable)
    New Comment:

    I can also confirm no hidden input element is output on Gentoo Linux
    using latest snapshot.

    Somethings *definately* wrong here, just need to figure out what.

    - Davey


    Previous Comments:
    ------------------------------------------------------------------------

    [2003-09-27 10:23:59] [email]davey@php.net[/email]

    I've now had it confirmed on *two* Debian Linux boxes with a 20030927
    snapshot that the hidden element does NOT get output.

    Trying to confirm on other distros, versions of windows and newer FBSD
    versions now.

    Note: the "Expected Result" has the extraneous hidden input, please
    mentally remove that ;)

    - Davey

    ------------------------------------------------------------------------

    [2003-09-27 08:36:22] [email]sniper@php.net[/email]

    RTFM "Note: If you want XHTML conformity, remove the form entry and
    use the <fieldset> tags around your form fields."

    ------------------------------------------------------------------------

    [2003-09-26 23:20:55] [email]davey@php.net[/email]

    Description:
    ------------
    Despite there being no form=fakeentry or form= (as I understand it,
    providing no value is the same as giving fakeentry) in
    url_rewriter.tags the form hidden element for the PHPSESSID is still
    output.

    I am trying to use form=action as the url_rewriter.tags and whilst this
    IS rewritten correctly, the hidden element is still being inserted. It
    seems that the fallback mechanism is faulty.

    This has been tested on several builds:
    PHP 4.3.3RC4 WinXP
    Latest Snapshot (200309270130) WinXP

    PHP 4.3.3 FreeBSD
    Latest Snapshot (200309270130) FreeBSD

    I have also had someone reporting the CORRECT behaviour on Debian with
    latest CVS so its quite the puzzle...

    - Davey

    Reproduce code:
    ---------------
    <?php
    session_start();
    setcookie('PHPSESSID','',0); /* needed if session.use_cookies is still
    on */
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <?php
    ini_set('url_rewriter.tags','a=href,area=href,fram e=src,input=src,form=action,foo=bar');
    echo ini_get("url_rewriter.tags") . "<br />";
    if(isset($_GET)) {
    var_dump($_GET);
    }
    ?>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
    <p>
    Foo: <input type="text" name="foo" value="" />
    <br />
    Bar: <input type="text" name="bar" value="" />
    <br />
    <input type="submit" value="Test!" />
    </p>
    <foo href="foo.php" bar="null" />
    </form>
    </body>
    </html>

    Expected result:
    ----------------
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled</title>
    </head>

    <body>
    a=href,area=href,frame=src,input=src,form=action,f oo=bar<br
    />array(0) {
    }
    <form
    action="/test/url_rewrite_form_action.php?PHPSESSID=6a5b43d2aef8 e2e3158e44fbd3df5d9d"
    method="get"><input type="hidden" name="PHPSESSID"
    value="6a5b43d2aef8e2e3158e44fbd3df5d9d" />
    <p>
    Foo: <input type="text" name="foo" value="" />
    <br />
    Bar: <input type="text" name="bar" value="" />
    <br />

    <input type="submit" value="Test!" />
    </p>
    <foo href="foo.php"
    bar="null?PHPSESSID=6a5b43d2aef8e2e3158e44fbd3df5d 9d" />
    </form>
    </body>
    </html>

    Actual result:
    --------------
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled</title>
    </head>

    <body>
    a=href,area=href,frame=src,input=src,form=action,f oo=bar<br
    />array(0) {
    }
    <form
    action="/test/url_rewrite_form_action.php?PHPSESSID=6a5b43d2aef8 e2e3158e44fbd3df5d9d"
    method="get"><input type="hidden" name="PHPSESSID"
    value="6a5b43d2aef8e2e3158e44fbd3df5d9d" />
    <p>
    Foo: <input type="text" name="foo" value="" />
    <br />
    Bar: <input type="text" name="bar" value="" />
    <br />

    <input type="submit" value="Test!" />
    </p>
    <foo href="foo.php"
    bar="null?PHPSESSID=6a5b43d2aef8e2e3158e44fbd3df5d 9d" />
    </form>
    </body>
    </html>


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=25676&edit=1[/url]
    davey@php.net Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139