Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2242771
T15866 suppress HTTP 400 error
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Authored By
aklapper
Jun 24 2024, 15:28
2024-06-24 15:28:57 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
T15866 suppress HTTP 400 error
View Options
diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php
index 2561e397b6..4337577c3e 100644
--- a/src/aphront/AphrontRequest.php
+++ b/src/aphront/AphrontRequest.php
@@ -705,7 +705,7 @@ final class AphrontRequest extends Phobject {
}
public function isPreviewRequest() {
- return $this->isFormPost() && $this->getStr('__preview__');
+ return $this->getStr('__preview__');
}
/**
diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php
index a696fb6cf7..2021da3615 100644
--- a/src/applications/transactions/editengine/PhabricatorEditEngine.php
+++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php
@@ -1892,10 +1892,11 @@ abstract class PhabricatorEditEngine
$controller = $this->getController();
$request = $controller->getRequest();
+ $is_preview = $request->isPreviewRequest();
// NOTE: We handle hisec inside the transaction editor with "Sign With MFA"
// comment actions.
- if (!$request->isFormOrHisecPost()) {
+ if (!$request->isFormOrHisecPost() && !$is_preview) {
return new Aphront400Response();
}
@@ -1911,7 +1912,6 @@ abstract class PhabricatorEditEngine
$fields = $this->buildEditFields($object);
- $is_preview = $request->isPreviewRequest();
$view_uri = $this->getEffectiveObjectViewURI($object);
$template = $object->getApplicationTransactionTemplate();
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
739095
Default Alt Text
T15866 suppress HTTP 400 error (1 KB)
Attached To
Mode
P44 T15866 suppress HTTP 400 error
Attached
Detach File
Event Timeline
Log In to Comment