Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13998559
D16570.id39887.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
D16570.id39887.diff
View Options
diff --git a/src/applications/console/controller/DarkConsoleDataController.php b/src/applications/console/controller/DarkConsoleDataController.php
--- a/src/applications/console/controller/DarkConsoleDataController.php
+++ b/src/applications/console/controller/DarkConsoleDataController.php
@@ -2,8 +2,6 @@
final class DarkConsoleDataController extends PhabricatorController {
- private $key;
-
public function shouldRequireLogin() {
return !PhabricatorEnv::getEnvConfig('darkconsole.always-on');
}
@@ -16,19 +14,15 @@
return true;
}
- public function willProcessRequest(array $data) {
- $this->key = $data['key'];
- }
-
- public function processRequest() {
- $request = $this->getRequest();
- $user = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $request->getViewer();
+ $key = $request->getURIData('key');
$cache = new PhabricatorKeyValueDatabaseCache();
$cache = new PhutilKeyValueCacheProfiler($cache);
$cache->setProfiler(PhutilServiceProfiler::getInstance());
- $result = $cache->getKey('darkconsole:'.$this->key);
+ $result = $cache->getKey('darkconsole:'.$key);
if (!$result) {
return new Aphront400Response();
}
@@ -43,7 +37,7 @@
return new Aphront400Response();
}
- if ($result['user'] != $user->getPHID()) {
+ if ($result['user'] != $viewer->getPHID()) {
return new Aphront400Response();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 25, 9:49 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6737682
Default Alt Text
D16570.id39887.diff (1 KB)
Attached To
Mode
D16570: Update DarkConsole for handleRequest
Attached
Detach File
Event Timeline
Log In to Comment