Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15401480
D12842.id30886.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
D12842.id30886.diff
View Options
diff --git a/src/aphront/configuration/AphrontApplicationConfiguration.php b/src/aphront/configuration/AphrontApplicationConfiguration.php
--- a/src/aphront/configuration/AphrontApplicationConfiguration.php
+++ b/src/aphront/configuration/AphrontApplicationConfiguration.php
@@ -62,6 +62,11 @@
$multimeter->setEventContext('<http-init>');
$multimeter->setEventViewer('<none>');
+ // Build a no-op write guard for the the setup phase. We'll replace this
+ // with a real write guard later on, but we need to survive setup and build
+ // a request object first.
+ $write_guard = new AphrontWriteGuard('id');
+
PhabricatorEnv::initializeWebEnvironment();
$multimeter->setSampleRate(
@@ -108,6 +113,11 @@
$application->willBuildRequest();
$request = $application->buildRequest();
+ // Now that we have a request, convert the write guard into one which
+ // actually checks for errors.
+ $write_guard->dispose();
+ $write_guard = new AphrontWriteGuard(array($request, 'validateCSRF'));
+
// Build the server URI implied by the request headers. If an administrator
// has not configured "phabricator.base-uri" yet, we'll use this to generate
// links.
@@ -121,8 +131,6 @@
'U' => (string)$request->getRequestURI()->getPath(),
));
- $write_guard = new AphrontWriteGuard(array($request, 'validateCSRF'));
-
$processing_exception = null;
try {
$response = $application->processRequest(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 5:53 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7710203
Default Alt Text
D12842.id30886.diff (1 KB)
Attached To
Mode
D12842: Allow setup checks to perform writes
Attached
Detach File
Event Timeline
Log In to Comment