Bug 116132

Summary: konq: form input field length limit is too short
Product: [Applications] konqueror Reporter: missive
Component: khtml formsAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: maksim
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: form with field full

Description missive 2005-11-11 16:21:42 UTC
Version:           3.4.3 (using KDE 3.4.3, Gentoo)
Compiler:          gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
OS:                Linux (i686) release 2.6.14-gentoo

I was filling out a form today where I needed to put a very long value in to a regular input field. There is a limit on the length of the data allowed to go in to the field which would not allow me to complete the form.

The field seems to be limited to 1024 characters. The data I needed to put in to the field (an ssh public key) is 1110 characters.

I was able to complete the form by using Firefox. The same form field on Firefox appears to have a much higher length limit (at least 10 times higher).
Comment 1 missive 2005-11-11 16:25:08 UTC
Created attachment 13387 [details]
form with field full
Comment 2 Peter Schaffter 2006-05-10 06:06:32 UTC
Confirming the bug report, I was unable to enter an ssh public key in a form
field at the savannah.org site.  The key was 1115 characters long.  I could only input up to the 1024th character.

I had no problem entering the same key using Firefox/Mozilla.
Comment 3 Philip Rodrigues 2006-09-07 21:42:54 UTC
Confirmed on 3.5 branch r575787
Comment 4 Maksim Orlovich 2006-09-28 00:17:11 UTC
SVN commit 589303 by orlovich:

Don't needlessly limit length of line inputs.
BUG:116132


 M  +1 -1      html/html_formimpl.cpp  
 M  +2 -2      rendering/render_form.cpp  


--- branches/KDE/3.5/kdelibs/khtml/html/html_formimpl.cpp #589302:589303
@@ -1398,7 +1398,7 @@
         if (!attr->val()) break;
         bool ok;
         const int ml = attr->val()->toInt(&ok);
-        if (ml > 0 && ml < 1024)
+        if (ml > 0 && ml < 32767)
             m_maxLen = ml;
         else if (ok && ml <= 0)
             m_maxLen = 0;
--- branches/KDE/3.5/kdelibs/khtml/rendering/render_form.cpp #589302:589303
@@ -538,8 +538,8 @@
 void RenderLineEdit::updateFromElement()
 {
     int ml = element()->maxLength();
-    if ( ml < 0 || ml > 1024 )
-        ml = 1024;
+    if ( ml < 0 )
+        ml = 32767;
 
     if ( widget()->maxLength() != ml )  {
         widget()->setMaxLength( ml );