From b42b78f65c998df662ce6cdd89e4316808871f43 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 17 Aug 2011 12:00:35 -0700 Subject: [PATCH] Unguard another safe write in Conduit token generation. --- .../controller/token/PhabricatorConduitTokenController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/conduit/controller/token/PhabricatorConduitTokenController.php b/src/applications/conduit/controller/token/PhabricatorConduitTokenController.php index d340af76fd..7dfe11e0d2 100644 --- a/src/applications/conduit/controller/token/PhabricatorConduitTokenController.php +++ b/src/applications/conduit/controller/token/PhabricatorConduitTokenController.php @@ -25,6 +25,11 @@ class PhabricatorConduitTokenController extends PhabricatorConduitController { $user = $this->getRequest()->getUser(); + // Ideally we'd like to verify this, but it's fine to leave it unguarded + // for now and verifying it would need some Ajax junk or for the user to + // click a button or similar. + $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); + $old_token = id(new PhabricatorConduitCertificateToken()) ->loadOneWhere( 'userPHID = %s',