Differential D25161 Diff 586 src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthSSHKeyEditController.php
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
} | } | ||||
$token = id(new PhabricatorAuthSessionEngine())->requireHighSecuritySession( | $token = id(new PhabricatorAuthSessionEngine())->requireHighSecuritySession( | ||||
$viewer, | $viewer, | ||||
$request, | $request, | ||||
$cancel_uri); | $cancel_uri); | ||||
$v_name = $key->getName(); | $v_name = $key->getName(); | ||||
$e_name = strlen($v_name) ? null : true; | $e_name = phutil_nonempty_string($v_name) ? null : true; | ||||
valerio.bozzolan: ✅ I checked `$v_name` with `phlog()` to verify that the input domain was `null` or a string. | |||||
$v_key = $key->getEntireKey(); | $v_key = $key->getEntireKey(); | ||||
$e_key = strlen($v_key) ? null : true; | $e_key = strlen($v_key) ? null : true; | ||||
$validation_exception = null; | $validation_exception = null; | ||||
if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
$type_create = PhabricatorTransactions::TYPE_CREATE; | $type_create = PhabricatorTransactions::TYPE_CREATE; | ||||
$type_name = PhabricatorAuthSSHKeyTransaction::TYPE_NAME; | $type_name = PhabricatorAuthSSHKeyTransaction::TYPE_NAME; | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ I checked $v_name with phlog() to verify that the input domain was null or a string. The phutil_nonempty_string() will report alien values and that is OK.