2010-01-29 102 views
4

這很奇怪:如果我登錄到我的應用程序,請問firefox保存用戶名/密碼。然後註銷並返回到登錄屏幕,firefox填充用戶名輸入字段中的密碼,從而使其可見!firefox將密碼填入用戶名字段

任何想法可能會導致問題?這裏是我的表格的html,雖然我已經檢查了10億次。

<form action="<?php echo WWWROOT ?>login/" autocomplete="on" method="post" name="extranetLoginForm" id="extranetLoginForm" > 
<ul id="formlog"> 
    <li id="liloginfield"> 
    <label for="loginfield" id="loginfieldlab"><span class="required"> 
    <img alt="user-icon" src="<?php echo WWWROOT ?>_img/icons/user.png" /> 
    Mon nom d'utilisateur : <small style="color:#AAA">(prenom.nom)</small></span> 
    </label> 
    <input id="loginfield" name="loginfield" class="text required ui-corner-all" type="text" tabindex="1" accesskey="l" /> 
    <label for="loginfield" class="error" id="error1"> 
    <img alt="erreur-login" src="<?php echo WWWROOT ?>_img/icons/exclamation.png" />Ce champ est obligatoire, r&eacute;digez comme ceci: prenom.nom</label> 
    </li> 
    <li id="lipass"> 
    <label for="password"> 
    <span class="required"><img alt="lost-pass" src="<?php echo WWWROOT ?>_img/icons/key.png" />mot de passe 
    <small class="help_form">(<a id="forgotPasswordLink" href="#">oublié</a> ?)</small></span> 
    </label> 
    <input name="password" type="password" class="text required ui-corner-all" id="password" minlength="4" maxlength="20" tabindex="2" accesskey="p" /> 
    <small class="checker" ></small> 
    <input type="hidden" name="errorpass" id="errorpass" value="0"/> 
    <label for="password" class="error" id="error2"><img alt="exclamation" src="<?php echo WWWROOT ?>_img/icons/exclamation.png" />Ce champ est obligatoire.</label> 
    </li> 
    <li> 
    <input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /><label for="rememberme"> Se souvenir de moi</label></p> 
    </li> 
    <li class="centeredtext"> 
    <input type="hidden" name="goto" id="goto" value="<?php echo WWWROOT.$_SESSION['AFTER_LOGIN_GOTO'] ?>"/> 
    <input type="hidden" name="login_type" id="loginTypeNormal" value="normal"/> 
    <input type="submit" class="ui-state-default button ui-corner-all short_input" value="GO!" id="submitlogin" tabindex="1" accesskey="L" /> 
    </li> 
    <li id="lipassforget"> 
    <label class="centered info"><a class="dark_link openidLink" href="#" id="openidLink">avec OpenID</a></label> 
    </li> 
    </ul> 
</form> 

回答

2

你有沒有機會改變字段名稱,即當用戶名/密碼由Firefox保存時,密碼字段被稱爲'loginfield'?根據Mozilla的wiki,密碼管理器將字段名與已保存的登錄信息一起存儲,所以它可能與此有關。

您是否嘗試從Firefox的密碼管理器中刪除用戶名/密碼,並在嘗試再次保存登錄信息時查看它是否再次發生?

+0

我剛剛嘗試使用其他名稱作爲我的輸入,複製Wordpress登錄頁面(使用相同的測試工具,事情按預期發生)並擦除所有保存的密碼。現在,情況會好一些:密碼字段是預填充的,但用戶名字段保持空白......我會看看是否使用其他文檔類型將扮演角色。任何其他想法? – pixeline 2010-01-29 19:41:16

+0

您可以嘗試將輸入框的名稱更改爲'用戶名'。當然,這似乎是任何瀏覽器密碼管理員都會尋找的最標準的領域。 – 2010-01-29 19:47:37

0

Mozilla Firefox的密碼管理器很奇怪。它有自己的想法。

https://wiki.mozilla.org/Firefox%3aPassword_Manager

如果你登錄到你的應用程序中使用Mozilla和您的登錄字段具有ID「L」和密碼字段標識「P」,它會記住那些ID,以便它可以把數值爲你。只有當您選中此選項時纔會發生這種情況:選項>安全>記住密碼複選框。現在

enter image description here

,如果你有一個網頁(或形成..真的不知道),用,要麼「L」或「P」,Mozilla的密碼管理器(相匹配的ID至少一個輸入字段內置於瀏覽器中)將嘗試使用其智能爲您填寫值,即使這兩個字段都不存在。請參閱下面的示例以獲得更好的照片這可能會幫助你解決你的問題。

讓我解釋...

我對取證軟件,用戶必須審覈他們在每個工作流所做的一切工作,所以它需要自己的密碼,因此,如果我們的客戶永遠得到FDA的審覈,我們有工作流程的記錄。因此,我們在每個按鈕的應用程序中都有一個密碼字段,但由於用戶已經登錄,我們不希望讓他們也輸入他們的登錄信息,以便字段被抑制。這是我必須做的,使這種方法的工作(對於Mozilla)。我不得不添加隱藏(顯示:無)輸入字段。

<input runat="server" type="text" style="display:none;"> 
<asp:TextBox id="TxtPassword" Runat="server" Width="80" EnableViewState="False" TextMode="Password"></asp:TextBox> 

TextBox控件實際呈現爲HTML中的輸入字段。在解決此問題之前,我在密碼字段前面有一個搜索字段,並將用戶名輸入到該字段中。如果在ID爲「P」的輸入字段(或者在本例中爲「TxtPassword」)之前沒有隱藏的輸入字段,它仍然會將登錄名放入我的搜索字段,因爲它在輸入字段前加上了id「TxtPassword 」。有隱藏的領域(隱藏)是在那裏解決這個問題在Mozilla。用戶名進入該輸入框,並且注意到它甚至沒有id,但是由於上面對話框圖中顯示的Mozilla設置,Mozilla會將登錄信息放入該字段。

相關問題