This write should also be unguarded, it is not vulnerable to CSRF.
This commit is contained in:
@@ -48,7 +48,10 @@ class PhabricatorRepositoryEditController
|
||||
if (!$repository->getDetail('github-token')) {
|
||||
$token = substr(base64_encode(Filesystem::readRandomBytes(8)), 0, 8);
|
||||
$repository->setDetail('github-token', $token);
|
||||
|
||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||
$repository->save();
|
||||
unset($unguarded);
|
||||
}
|
||||
|
||||
$views['github'] = 'GitHub';
|
||||
|
||||
Reference in New Issue
Block a user