Page MenuHomePhabricator

D10253.diff
No OneTemporary

D10253.diff

diff --git a/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php b/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php
--- a/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php
+++ b/src/applications/auth/provider/PhabricatorLDAPAuthProvider.php
@@ -388,6 +388,7 @@
->setName($key)
->setLabel($label)
->setCaption($caption)
+ ->setDisableAutocomplete(true)
->setValue($value);
break;
case 'textarea':
diff --git a/src/applications/auth/provider/PhabricatorOAuthAuthProvider.php b/src/applications/auth/provider/PhabricatorOAuthAuthProvider.php
--- a/src/applications/auth/provider/PhabricatorOAuthAuthProvider.php
+++ b/src/applications/auth/provider/PhabricatorOAuthAuthProvider.php
@@ -113,13 +113,14 @@
$form
->appendChild(
id(new AphrontFormTextControl())
- ->setLabel($id_label)
+ ->setLabel($id_label)
->setName($key_id)
->setValue($v_id)
->setError($e_id))
->appendChild(
id(new AphrontFormPasswordControl())
- ->setLabel($secret_label)
+ ->setLabel($secret_label)
+ ->setDisableAutocomplete(true)
->setName($key_secret)
->setValue($v_secret)
->setError($e_secret))
diff --git a/src/applications/diffusion/panel/DiffusionSetPasswordPanel.php b/src/applications/diffusion/panel/DiffusionSetPasswordPanel.php
--- a/src/applications/diffusion/panel/DiffusionSetPasswordPanel.php
+++ b/src/applications/diffusion/panel/DiffusionSetPasswordPanel.php
@@ -125,6 +125,7 @@
$form
->appendChild(
id(new AphrontFormPasswordControl())
+ ->setDisableAutocomplete(true)
->setLabel(pht('Current Password'))
->setDisabled(true)
->setValue('********************'));
@@ -139,11 +140,13 @@
$form
->appendChild(
id(new AphrontFormPasswordControl())
+ ->setDisableAutocomplete(true)
->setName('password')
->setLabel(pht('New VCS Password'))
->setError($e_password))
->appendChild(
id(new AphrontFormPasswordControl())
+ ->setDisableAutocomplete(true)
->setName('confirm')
->setLabel(pht('Confirm VCS Password'))
->setError($e_confirm))
diff --git a/src/applications/passphrase/controller/PassphraseCredentialEditController.php b/src/applications/passphrase/controller/PassphraseCredentialEditController.php
--- a/src/applications/passphrase/controller/PassphraseCredentialEditController.php
+++ b/src/applications/passphrase/controller/PassphraseCredentialEditController.php
@@ -276,6 +276,7 @@
if ($type->shouldShowPasswordField()) {
$form->appendChild(
id(new AphrontFormPasswordControl())
+ ->setDisableAutocomplete(true)
->setName('password')
->setLabel($type->getPasswordLabel())
->setDisabled($credential_is_locked)
diff --git a/src/applications/passphrase/credentialtype/PassphraseCredentialTypePassword.php b/src/applications/passphrase/credentialtype/PassphraseCredentialTypePassword.php
--- a/src/applications/passphrase/credentialtype/PassphraseCredentialTypePassword.php
+++ b/src/applications/passphrase/credentialtype/PassphraseCredentialTypePassword.php
@@ -27,7 +27,8 @@
}
public function newSecretControl() {
- return new AphrontFormPasswordControl();
+ return id(new AphrontFormPasswordControl())
+ ->setDisableAutocomplete(true);
}
}
diff --git a/src/applications/people/controller/PhabricatorPeopleLdapController.php b/src/applications/people/controller/PhabricatorPeopleLdapController.php
--- a/src/applications/people/controller/PhabricatorPeopleLdapController.php
+++ b/src/applications/people/controller/PhabricatorPeopleLdapController.php
@@ -16,20 +16,21 @@
->setUser($admin)
->appendChild(
id(new AphrontFormTextControl())
- ->setLabel(pht('LDAP username'))
- ->setName('username'))
+ ->setLabel(pht('LDAP username'))
+ ->setName('username'))
->appendChild(
id(new AphrontFormPasswordControl())
- ->setLabel(pht('Password'))
- ->setName('password'))
+ ->setDisableAutocomplete(true)
+ ->setLabel(pht('Password'))
+ ->setName('password'))
->appendChild(
id(new AphrontFormTextControl())
- ->setLabel(pht('LDAP query'))
- ->setCaption(pht('A filter such as (objectClass=*)'))
- ->setName('query'))
+ ->setLabel(pht('LDAP query'))
+ ->setCaption(pht('A filter such as (objectClass=*)'))
+ ->setName('query'))
->appendChild(
id(new AphrontFormSubmitControl())
- ->setValue(pht('Search')));
+ ->setValue(pht('Search')));
$panel = id(new AphrontPanelView())
->setHeader(pht('Import LDAP Users'))
diff --git a/src/applications/settings/panel/PhabricatorSettingsPanelPassword.php b/src/applications/settings/panel/PhabricatorSettingsPanelPassword.php
--- a/src/applications/settings/panel/PhabricatorSettingsPanelPassword.php
+++ b/src/applications/settings/panel/PhabricatorSettingsPanelPassword.php
@@ -155,12 +155,14 @@
$form
->appendChild(
id(new AphrontFormPasswordControl())
+ ->setDisableAutocomplete(true)
->setLabel(pht('New Password'))
->setError($e_new)
->setName('new_pw'));
$form
->appendChild(
id(new AphrontFormPasswordControl())
+ ->setDisableAutocomplete(true)
->setLabel(pht('Confirm Password'))
->setCaption($len_caption)
->setError($e_conf)
diff --git a/src/view/form/control/AphrontFormPasswordControl.php b/src/view/form/control/AphrontFormPasswordControl.php
--- a/src/view/form/control/AphrontFormPasswordControl.php
+++ b/src/view/form/control/AphrontFormPasswordControl.php
@@ -2,6 +2,13 @@
final class AphrontFormPasswordControl extends AphrontFormControl {
+ private $disableAutocomplete;
+
+ public function setDisableAutocomplete($disable_autocomplete) {
+ $this->disableAutocomplete = $disable_autocomplete;
+ return $this;
+ }
+
protected function getCustomControlClass() {
return 'aphront-form-control-password';
}
@@ -14,6 +21,7 @@
'name' => $this->getName(),
'value' => $this->getValue(),
'disabled' => $this->getDisabled() ? 'disabled' : null,
+ 'autocomplete' => ($this->disableAutocomplete ? 'off' : null),
'id' => $this->getID(),
));
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 9:48 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6730344
Default Alt Text
D10253.diff (6 KB)

Event Timeline