Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/provider/PhabricatorOAuthAuthProvider.php
Context not available. | |||||
$key_id = $this->getIDKey(); | $key_id = $this->getIDKey(); | ||||
$key_secret = $this->getSecretKey(); | $key_secret = $this->getSecretKey(); | ||||
if (!strlen($values[$key_id])) { | if (!@strlen($values[$key_id])) { | ||||
$errors[] = $id_error; | $errors[] = $id_error; | ||||
$issues[$key_id] = pht('Required'); | $issues[$key_id] = pht('Required'); | ||||
} | } | ||||
if (!strlen($values[$key_secret])) { | if (!@strlen($values[$key_secret])) { | ||||
$errors[] = $secret_error; | $errors[] = $secret_error; | ||||
$issues[$key_secret] = pht('Required'); | $issues[$key_secret] = pht('Required'); | ||||
} | } | ||||
// If the user has not changed the secret, don't update it (that is, | // If the user has not changed the secret, don't update it (that is, | ||||
// don't cause a bunch of "****" to be written to the database). | // don't cause a bunch of "****" to be written to the database). | ||||
if (preg_match('/^[*]+$/', $values[$key_secret])) { | if (@preg_match('/^[*]+$/', $values[$key_secret])) { | ||||
unset($values[$key_secret]); | unset($values[$key_secret]); | ||||
} | } | ||||
Context not available. | |||||
$v_id = $values[$key_id]; | $v_id = $values[$key_id]; | ||||
$v_secret = $values[$key_secret]; | $v_secret = $values[$key_secret]; | ||||
if ($v_secret) { | if ($v_secret) { | ||||
$v_secret = str_repeat('*', strlen($v_secret)); | $v_secret = str_repeat('*', @strlen($v_secret)); | ||||
} | } | ||||
$v_note = $values[$key_note]; | $v_note = $values[$key_note]; | ||||
Context not available. | |||||
switch ($key) { | switch ($key) { | ||||
case self::PROPERTY_NOTE: | case self::PROPERTY_NOTE: | ||||
if (strlen($old)) { | if (@strlen($old)) { | ||||
return pht( | return pht( | ||||
'%s updated the OAuth application notes for this provider.', | '%s updated the OAuth application notes for this provider.', | ||||
$xaction->renderHandleLink($author_phid)); | $xaction->renderHandleLink($author_phid)); | ||||
Context not available. |
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