| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2005-10-18 17:45 UTC] denials at gmail dot com
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 11:00:01 2025 UTC | 
Description: ------------ The input fields for the "New Package" form (peclweb/public_html/package-new.php) should set the maximum length of the field. In HTML::Form this is the fourth optional parameter for the HTML::Form->returnText() function. Reproduce code: --------------- Index: package-new.php =================================================================== RCS file: /repository/peclweb/public_html/package-new.php,v retrieving revision 1.24 diff -u -r1.24 package-new.php --- package-new.php 9 Oct 2005 00:28:00 -0000 1.24 +++ package-new.php 18 Oct 2005 16:23:36 -0000 @@ -131,7 +131,7 @@ $bb = new BorderBox("Register package", "100%", "", 2, true); $bb->horizHeadRow("Package Name", $form->returnText("name", get("name"), 20)); - $bb->horizHeadRow("License", $form->returnText("license", get("license"), 20)); + $bb->horizHeadRow("License", $form->returnText("license", get("license"), 20, 20)); $cats = $form->returnSelect("category", $categories, get("category"), 1, "--Select Category--"); $bb->horizHeadRow("Category", $cats); Expected result: ---------------- Typical user will be unable to enter > 20 chars in the License text field, preventing unexpected truncation of the input. Setting the maxlength attribute of the text field will let users know how much text they have to work with. Actual result: -------------- I found this problem when I added the PDO_IDS package with the license "Apache License, Version 2.0", only to have the database silently truncate the input to "Apache License, Ver". The same bug bit me when I added the ibm_db2 license.