首页 文章

Phabricator:如何在登录表单上禁用自动完成功能?

提问于
浏览
0

刚刚在我们的组织中安装了“Phabricator”并习惯了它 . 但是,我们的IT对象是登录表单上的自动完成功能 .

这可以以人道的方式禁用吗? (即没有破坏任何其他东西)

谢谢 .

2 回答

  • 1

    您可以修改Phabricator的代码,https://secure.phabricator.com/D10253可以作为指导 .

    了解简单地设置autocomplete = off不会解决某些浏览器的问题,这些浏览器会忽略开发人员的愿望(例如Chrome和Firefox) .

    请参阅https://secure.phabricator.com/T5579进行讨论 .

  • 1

    答案是:

    diff --git a/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php b/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php
    index 68dbf1e..43d5932 100644
    --- a/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php
    +++ b/src/applications/auth/provider/PhabricatorPasswordAuthProvider.php
    @@ -230,11 +230,13 @@ final class PhabricatorPasswordAuthProvider extends PhabricatorAuthProvider {
           ->setLabel(pht('Username or Email'))
           ->setName('username')
           ->setValue($v_user)
    +      ->setDisableAutocomplete(true)
           ->setError($e_user))
       ->appendChild(
         id(new AphrontFormPasswordControl())
           ->setLabel(pht('Password'))
           ->setName('password')
    +   ->setDisableAutocomplete(true)
        ->setError($e_pass));
    
    if ($require_captcha) {
    

    (但是,我仍然会接受@ chad-little的回答)

相关问题