Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Paste
P44
T15866 suppress HTTP 400 error
Active
Public
Actions
Authored by
aklapper
on Jun 24 2024, 15:28.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Tags
None
Referenced Files
F2242771: T15866 suppress HTTP 400 error
Jun 24 2024, 15:28
2024-06-24 15:28:57 (UTC+0)
Subscribers
None
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();
Event Timeline
aklapper
created this paste.
Jun 24 2024, 15:28
2024-06-24 15:28:57 (UTC+0)
aklapper
created this object in space
S1 Public
.
aklapper
mentioned this in
T15866: Aphront400Response when editing a task
.
Jun 24 2024, 15:31
2024-06-24 15:31:05 (UTC+0)
Log In to Comment