Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14012983
D9772.id23465.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9772.id23465.diff
View Options
diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php
--- a/src/aphront/AphrontRequest.php
+++ b/src/aphront/AphrontRequest.php
@@ -274,6 +274,18 @@
return $this->validateCSRF();
}
+ final public function isFormOrHisecPost() {
+ $post = $this->getExists(self::TYPE_FORM) &&
+ $this->isHTTPPost();
+
+ if (!$post) {
+ return false;
+ }
+
+ return $this->validateCSRF();
+ }
+
+
final public function setCookiePrefix($prefix) {
$this->cookiePrefix = $prefix;
return $this;
diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignController.php b/src/applications/legalpad/controller/LegalpadDocumentSignController.php
--- a/src/applications/legalpad/controller/LegalpadDocumentSignController.php
+++ b/src/applications/legalpad/controller/LegalpadDocumentSignController.php
@@ -115,7 +115,15 @@
$e_agree = null;
$errors = array();
- if ($request->isFormPost() && !$has_signed) {
+ if ($request->isFormOrHisecPost() && !$has_signed) {
+
+ // Require two-factor auth to sign legal documents.
+ $engine = new PhabricatorAuthSessionEngine();
+ $engine->requireHighSecuritySession(
+ $viewer,
+ $request,
+ '/'.$document->getMonogram());
+
$name = $request->getStr('name');
$agree = $request->getExists('agree');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 2, 11:00 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6734887
Default Alt Text
D9772.id23465.diff (1 KB)
Attached To
Mode
D9772: Require high-security session to sign legal documents
Attached
Detach File
Event Timeline
Log In to Comment