Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/provider/PhabricatorLDAPAuthProvider.php
Context not available. | |||||
$username = $request->getStr('ldap_username'); | $username = $request->getStr('ldap_username'); | ||||
$password = $request->getStr('ldap_password'); | $password = $request->getStr('ldap_password'); | ||||
$has_password = strlen($password); | $has_password = @strlen($password); | ||||
$password = new PhutilOpaqueEnvelope($password); | $password = new PhutilOpaqueEnvelope($password); | ||||
if (!strlen($username) || !$has_password) { | if (!@strlen($username) || !$has_password) { | ||||
$response = $controller->buildProviderPageResponse( | $response = $controller->buildProviderPageResponse( | ||||
$this, | $this, | ||||
$this->renderLoginForm($request, 'login')); | $this->renderLoginForm($request, 'login')); | ||||
Context not available. | |||||
if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
try { | try { | ||||
if (strlen($username) && $has_password) { | if (@strlen($username) && $has_password) { | ||||
$adapter = $this->getAdapter(); | $adapter = $this->getAdapter(); | ||||
$adapter->setLoginUsername($username); | $adapter->setLoginUsername($username); | ||||
$adapter->setLoginPassword($password); | $adapter->setLoginPassword($password); | ||||
Context not available. | |||||
} | } | ||||
$instruction_text = idx($instructions, $key); | $instruction_text = idx($instructions, $key); | ||||
if (strlen($instruction_text)) { | if (@strlen($instruction_text)) { | ||||
$form->appendRemarkupInstructions($instruction_text); | $form->appendRemarkupInstructions($instruction_text); | ||||
} | } | ||||
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