[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:16:47 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 51317c1403334e296bfa26db59a2f61ebf41a3ac
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 20 21:50:09 2002 +0000

            Reviewed by Darin
    
    	Fix for this bug:
    
    	Radar 3132171 (trying to login at mypage.apple.com gives "Already Connected" message)
    
    	The issue is that we submit the login form more than once when the user hits
    	the return key to submit rather than clicking the submit button. We are also
    	susceptible to double form submissions from buggy scripts that ask to submit
    	more than one form.
    
    	The fix is to prevent the KWQKHTMLPart from submitting more than one form by
    	setting and checking a flag.
    
            * kwq/KWQKHTMLPart.h: Add a form submit flag.
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::submitForm): Check form submit flag. Return if a form
    	has already been submitted.
            (KWQKHTMLPart::setView): Reset form flag. This is done since the part
    	may have been retrieved for reuse from the bac/forward cache.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3153 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 4a04207..85c9e44 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,26 @@
+2002-12-20  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Darin
+
+	Fix for this bug:
+
+	Radar 3132171 (trying to login at mypage.apple.com gives "Already Connected" message)
+
+	The issue is that we submit the login form more than once when the user hits
+	the return key to submit rather than clicking the submit button. We are also
+	susceptible to double form submissions from buggy scripts that ask to submit
+	more than one form.
+
+	The fix is to prevent the KWQKHTMLPart from submitting more than one form by
+	setting and checking a flag.
+
+        * kwq/KWQKHTMLPart.h: Add a form submit flag.
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::submitForm): Check form submit flag. Return if a form
+	has already been submitted.
+        (KWQKHTMLPart::setView): Reset form flag. This is done since the part 
+	may have been retrieved for reuse from the bac/forward cache.
+
 2002-12-20  Richard Williamson   <rjw at apple.com>
 
         Fixed 3133261.  This fix really has two parts.  This first part
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4a04207..85c9e44 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,26 @@
+2002-12-20  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Darin
+
+	Fix for this bug:
+
+	Radar 3132171 (trying to login at mypage.apple.com gives "Already Connected" message)
+
+	The issue is that we submit the login form more than once when the user hits
+	the return key to submit rather than clicking the submit button. We are also
+	susceptible to double form submissions from buggy scripts that ask to submit
+	more than one form.
+
+	The fix is to prevent the KWQKHTMLPart from submitting more than one form by
+	setting and checking a flag.
+
+        * kwq/KWQKHTMLPart.h: Add a form submit flag.
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::submitForm): Check form submit flag. Return if a form
+	has already been submitted.
+        (KWQKHTMLPart::setView): Reset form flag. This is done since the part 
+	may have been retrieved for reuse from the bac/forward cache.
+
 2002-12-20  Richard Williamson   <rjw at apple.com>
 
         Fixed 3133261.  This fix really has two parts.  This first part
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index b65a186..895e918 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -197,6 +197,8 @@ private:
     static NSEvent *_currentEvent;
     static NSResponder *_firstResponderAtMouseDownTime;
 
+    bool _formSubmittedFlag;
+
     static QPtrList<KWQKHTMLPart> &mutableInstances();
 
     friend class KHTMLPart;
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index ab856c5..0f35147 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -123,6 +123,7 @@ KWQKHTMLPart::KWQKHTMLPart()
     , _ownsView(false)
     , _mouseDownView(nil)
     , _sendingEventToSubview(false)
+    , _formSubmittedFlag(false)
 {
     // Must init the cache before connecting to any signals
     Cache::init();
@@ -180,6 +181,15 @@ void KWQKHTMLPart::openURLRequest(const KURL &url, const URLArgs &args)
 
 void KWQKHTMLPart::submitForm(const KURL &url, const URLArgs &args)
 {
+    // we do not want to submit more than one form, nor do we want to submit a single form more than once 
+    // this flag prevents these from happening
+    // note that the flag is reset in setView()
+    // since this part may get reused if it is pulled from the b/f cache
+    if (_formSubmittedFlag) {
+        return;
+    }
+    _formSubmittedFlag = true;
+    
     if (!args.doPost()) {
         [bridgeForFrameName(args.frameName) loadURL:url.url().getNSString() reload:args.reload
             triggeringEvent:_currentEvent isFormSubmission:YES];
@@ -258,6 +268,11 @@ void KWQKHTMLPart::setView(KHTMLView *view, bool weOwnIt)
     d->m_view = view;
     setWidget(view);
     _ownsView = weOwnIt;
+    
+    // only one form submission is allowed per view of a part
+    // since this part may be getting reused as a result of being
+    // pulled from the back/forward cache, reset this flag
+    _formSubmittedFlag = false;
 }
 
 KHTMLView *KWQKHTMLPart::view() const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list