how to disable remember form data in nw.js - nw.js

i am new in nw.js and currently i am developing and sample app in nw.js. I downloaded nw.js 64bit and create an small login page and its working perfect. But when i login once it saves my login details and never removes even i restart my app many times but my details are still there.
can any one tell me how i can prevent nw.js chromium to save my login details.
MyCode:
<form method="POST" action="example.html" id="loginNow" autocomplete="nope">
<div class="login-card" style="margin-top: 10%;">
<h1>Log-in</h1><br>
<select name="usertype" style="width:100%; font-size: 13px; min-height: 30px; margin-bottom:3.5%;">
<option>Select User Type</option>
<option value="rps">RPS</option>
<option value="gd">Godown</option>
</select>
<input type="text" name="username" placeholder="Username" id="username" value="" autocomplete="nope">
<input type="password" name="password" placeholder="Password" id="password" value="" autocomplete="nope">
<input type="submit" name="login" class="login login-submit" value="login" id="loginBut">
<div class="login-help">
Forgot Password
Switch To Online
</div>

This has been driving me crazy. Apparently Chromium ignores autocomplete="off" now.
The correct way to do this is to set autocomplete="new-password" on the password input, as seen here.

Try this setting in your package.json:
"chromium-args": "--disable-password-generation",

Related

Security scanning has flagged Sonarqube as not disabling the AutoComplete attribute on password field

SonarQube 5.3
A recent security scan of our SonarQube server from our IT department states:
"AutoComplete Attribute Not Disabled for Password in Form Based Authentication"
I've tested this out in 3 different browsers (FF, Chrome, IE 11) and none of them autocomplete the password (although FF does autocomplete the login id).
Is there anything I can configure in SonarQube to satisfy the scanner?
Does SonarQube take any other steps that prevent auto-completion of passwords, so that this can be flagged as a false positive?
Cheers,
Dave
Scanner complained about this code:
<form id="login_form" action="/sessions/login" method="post">
<input type="hidden" name="return_to_anchor" value="">
<h1 class="maintenance-title text-center">Log In to SonarQube</h1>
<div class="big-spacer-bottom">
<label for="login" class="login-label">Login</label>
<input type="text" id="login" name="login" class="login-input" maxlength="255" required
placeholder="Login">
</div>
<p class="big-spacer-bottom">
<label for="password" class="login-label">Password</label>
<input type="password" id="password" name="password" class="login-input" required
placeholder="Password">
</p>
<p class="big-spacer-bottom">
<input class="login-remember-me" id="remember_me" name="remember_me" type="checkbox" value="1" checked>
<label for="remember_me"></label>
<label for="remember_me">Remember me on this computer</label>
</p>
<p class="text-right">
<button name="commit">Log in</button>
<a class="spacer-left" href="/">Cancel</a>
</p>
</form>
I second Ann's question, which tool did you used ?
I've just checked and SonarQube 5.3 does have the parameter autocomplete=off on login page. So I'm wondering if you are talking about another page or if it's a false positive of a security scan.

Firefox bug with input type password?

I have a problem in an application I'm developing, if I have input fields with type 'password' then another input field is populated with data from a completely different element.
If I set the type of the element that is 'password' to 'text' there is no problem.
Unforunatley I can't post an example of jsFiddle, but I've searched around and found other people having a problem with Firefox with an older version.
I'm using version: 43.0b9 with Firebug 2.0.13
IE, Chrome and Safari do not do this with the exact same page loaded, but its very repeatable and very realiable in FireFox.
I've set the attribute autocomplete="off" but no difference.
This problem has me scratching my head...I've commented out just about everything, but the problem still occurs, some how my name and login password are finding there way into two INPUT elements, the same page in Chrome, IE and Safari does not do this.
I was having the same problem, and finally solved it after reading this answer to other similar question: https://stackoverflow.com/a/10745884/6938721
In my case, I had a lot of input fields divided into multiple fieldsets, and sent them through AJAX.
Well, the solution was to surround each <fieldset>...</fieldset> with <form>...</form> labels.
Originally I had something like:
<fieldset>
<input type="text" name="field1">
<input type="password" name="field2">
<input type="password" name="field3">
</fieldset>
<fieldset>
<input type="text" name="field4">
<input type="password" name="field5">
<input type="password" name="field6">
</fieldset>
And after applying the solution I get:
<form>
<fieldset>
<input type="text" name="field1">
<input type="password" name="field2">
<input type="password" name="field3">
</fieldset>
</form>
<form>
<fieldset>
<input type="text" name="field4">
<input type="password" name="field5">
<input type="password" name="field6">
</fieldset>
</form>
Edit:
The key is to not have more than 3 password inputs inside a <form> block. The document works as a <form> block by itself
Hope this helps

Paypal form submission - mobile

Im using below code to submit values in to Paypal and its working.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
<h2 style="font-family:Segoe UI;">Your Email :</h2>
<input type="text" name="business" value="youremailaddress#yourdomain.com" style="width:1000px; height:50px; margin-left:30px;"/>
<br />
<h2 style="font-family:Segoe UI;">Driveway Size :</h2>
<input type="hidden" name="item_name" value="" />
<select id="item_price" name="amount" style="width:1000px; height:50px; margin-left:30px;">
<option value="325">Single $325.00</option>
<option value="375">Double $375.00</option>
<option value="400">2.5 $400.00</option>
<option value="425">Triple $425.00</option>
<option value="450">3.5 $450.00</option>
<option value="475">Quad $475.00</option>
</select>
<br />
<input type="submit" value="Buy!" style="margin-top:30px"/>
</form>
But this is desktop version. is there anyway that I can do same thing for mobiles?
Yes you can. You could for example use System.Net.WebClient to make the post towards the URL you have in the action field of the form.
Or, you can have the above HTML code embedded inside a web-browser control in your application.

Form submission issue IE9 + Ajax

I have a form that is served via Ajax from the server when a button is clicked. It pops up in a jquery dialog.
<form onsubmit="hideModal();return getAJAX(this);">
<input type="hidden" name="action" value="updateUserNotes">
<input type="hidden" name="userid" value="20312">
<hr/>
<B>Flags:</B><BR/>
<input type="radio" name="flag" value="none" checked> <img src="images/icons/grey_flag.png"> No Flag<BR>
<input type="radio" name="flag" value="green" > <img src="images/icons/flag_green.png"> Green Flag<BR>
<input type="radio" name="flag" value="red" > <img src="images/icons/flag_red.png"> Red Flag
<B>NOTES:</B><BR>
<textarea name="usernotes" cols="80" rows="10"></textarea>
<input type="submit" value="Save Notes">
</form>
This is the code that my script sends back to display the form. With the HR in there, the form will not submit when you click "save notes". It does not throw a javascript error, it simply does not submit.
If I remove the horizontal rule the form submits 100% fine.
Anyone know what might be causing this? It only appears to affect IE9. I cannot replicate it in Chrome or Firefox or earlier versions of IE9.
I think it has something to do with IE9's strictness, but I can't figure out how the horizontal rule is messing anything up.

Multiple password forms + password completion

On a website I'm working we have an onsite login and a private login, the problem I'm having is that Firefox doesn't seem to be able to differentiate between these login forms.
Does anybody know how I can make clear that these are different logins?
I already tried giving the form fields different names and ids, ex: onsite_login and login but without success.
edit: my form-tags are not being mixed up, they aren't even on the same page
The two forms on the different pages
<form method="post" action="/en/login/1">
<fieldset>
<p>
<input type="hidden" value="login" name="form"/>
<input type="hidden" value="en" name="redirect"/>
<label for="onsite_username">Username<abbr title="Required ">*</abbr></label>
<input type="text" class="input-text" maxlength="255" value="" name="onsite_username" id="onsite_username"/>
<label for="onsite_password">Password<abbr title="Required ">*</abbr></label>
<input type="password" class="input-password" maxlength="255" value="" name="onsite_password" id="onsite_password"/>
<input type="submit" value="Log in" name="submit" class="input-submit"/>
</p>
</fieldset>
</form>
and
<form method="post" action="">
<fieldset>
<input type="hidden" value="login" name="form"/>
<div>
<label for="username">Username</label>
<input type="text" class="input-text" value="" name="username" id="username"/>
</div><div>
<label for="password">Password</label>
<input type="password" class="input-password" value="" name="password" id="password"/>
</div>
<input type="submit" value="Aanmelden" class="input-submit"/>
</fieldset>
</form>
Apparently this is not possible due to the way Firefox stores its passwords.
A password-manager entry is stored with the following data
The username (encrypted and secured with Firefox Master Password).
The password (encrypted and secured with Firefox Master Password).
The hostname of the webpage containing the login form.
The hostname of the webpage to which the form data has been submitted.
Thus Firefox does not distinguish between the two loginfields on my page.
I've not yet heard about a multiple form problem in Firefox.
But it could be that Firefox mixed up your 2 login forms if there is another tag around that is not closed properly.
I've had that problem myself with <p> tags and a not properly closed <div> around it.
I'm not sure.. but try to give them a different ID like <form method="POST" action="#" id="login1">

Resources