mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
This write should also be unguarded, it is not vulnerable to CSRF.
This commit is contained in:
parent
88eb6410b3
commit
90be65f6ec
1 changed files with 3 additions and 0 deletions
|
@ -48,7 +48,10 @@ class PhabricatorRepositoryEditController
|
||||||
if (!$repository->getDetail('github-token')) {
|
if (!$repository->getDetail('github-token')) {
|
||||||
$token = substr(base64_encode(Filesystem::readRandomBytes(8)), 0, 8);
|
$token = substr(base64_encode(Filesystem::readRandomBytes(8)), 0, 8);
|
||||||
$repository->setDetail('github-token', $token);
|
$repository->setDetail('github-token', $token);
|
||||||
|
|
||||||
|
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||||
$repository->save();
|
$repository->save();
|
||||||
|
unset($unguarded);
|
||||||
}
|
}
|
||||||
|
|
||||||
$views['github'] = 'GitHub';
|
$views['github'] = 'GitHub';
|
||||||
|
|
Loading…
Reference in a new issue