Bug #5716 [Opn->Csd]: Input fields should set maximum length to prevent unexpected input truncation

From: Date: Tue, 18 Oct 2005 21:45:22 +0000
Subject: Bug #5716 [Opn->Csd]: Input fields should set maximum length to prevent unexpected input truncation
References: 1  Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-4514@lists.php.net to get a copy of this message
Edit report at http://pecl.php.net/bugs/bug.php?id=5716&edit=1 ID: 5716 Updated by: denials@gmail.com Reported By: dbs at php dot net -Status: Open +Status: Closed Type: Bug Package: Web Site PHP Version: Irrelevant New Comment: This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pecl.php.net. In case this was a pecl.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PECL better. The database column definition for license was altered to be a max of 50 chars. I have committed a change that implements a maxlength setting for most of the input fields on this page according to the database definitions. Previous Comments: ------------------------------------------------------------------------ [2005-10-18 12:29:22] dbs at php dot net 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. ------------------------------------------------------------------------ -- Edit this bug report at http://pecl.php.net/bugs/bug.php?id=5716&edit=1

« previous php.pear.webmaster (#4514) next »