From 05a19c5ba7145bed7c2a323e5f6c9e9babea53a0 Mon Sep 17 00:00:00 2001 From: Adam Roses Wight Date: Wed, 4 Jun 2014 17:13:31 -0700 Subject: [PATCH] Soften test for incomplete edit POST Do not reject POSTs from forms that were rendered before wpUltimateParam was added. There is also an open question about whether we should respect kludgey scripts which have hardcoded form params. See Umherirrender's comment on change I78f1bbcc9bb092568fbfbec19c08d697c9ae75f8 Change-Id: I28bd6d45442bc3ba352f0de7a50709adb98b1c50 --- includes/EditPage.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 8f85c1816c..9108783523 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -799,7 +799,11 @@ class EditPage { } else { // If we receive the last parameter of the request, we can fairly // claim the POST request has not been truncated. - $this->incompleteForm = !$request->getVal( 'wpUltimateParam' ); + + // TODO: softened the check for cutover. Once we determine + // that it is safe, we should complete the transition by + // removing the "edittime" clause. + $this->incompleteForm = ( !$request->getVal( 'wpUltimateParam' ) && is_null( $this->edittime ) ); } if ( $this->incompleteForm ) { # If the form is incomplete, force to preview. -- 2.20.1