iOS safari asks to login automatically on website when not wanted - html

After previously logging into a website I'm building, on testing iOS safari constantly presents "Log in to: [website name]" then a button with my username. On inspection I was able to get rid of this by deleting the login form hidden in the html footer on every page, however I would like to keep the form in my code.
<form action="/" method="POST" class="login" id="login-model">
<input type="text" name="user" placeholder="NAME" />
<input type="password" name="pass" placeholder="PASSWORD" />
<button class="btn">LOGIN</button>
</form>
Is there something I can change about this html so that iOS doesn't "help me out" and bring up the login automatically, this is not wanted.
This is what I currently see:

Related

Cannot open another page

Screenshot
I'm making a Kakao talk clone for study purposes.
When I click on the button, I can't see anything on my website.
Source: https://github.com/fatejin/kakao-clone-v2.git
The login button is trying to do a submit to friends.html page and that page doesn't exist in your repo so you're getting a 404 (page not found). If you create a friends.html page then clicking the login button will redirect to there.
<form action="friends.html" method="get" id="login-form">
<input name="username" type="text" placeholder="Email or phone number" />
<input name="password" type="password" placeholder="Password" />
<input type="submit" value="Log In" />
Find Kakao talk Account or Password
</form>

Chrome auto-fill & autocomplete=on not working

I can find a lot of references even on StackOverflow that Chrome Auto-fill functionality should work if autocomplete="on".
However that does not seem to be the case with the latest Chrome I have here (60.0.3112.90). To be precise - default browser autocomplete works fine , but Auto-fill will ignore the field completely.
The code below won't work with Chrome Auto-fill:
<form method="post" name="checkout" url="/">
<input type="text" name="given-name" autocomplete="on" />
<input type="text" name="email" autocomplete="on" />
</form>
However, this will work without issues:
<form method="post" name="checkout" url="/">
<input type="text" name="given-name" autocomplete="given-name" />
<input type="text" name="email" autocomplete="email" />
</form>
You can easily test it here: https://jsfiddle.net/kw4yjpz4/
Screenshots:
Does it mean that all input fields now have to have autocomplete="[NAME]" for auto-fill to work? Is this a bug in the newest Chrome or intended behaviour?
I stumbled across this same issue and searching led me here... I moved on not finding an answer and finally stumbled across the answer to my cause of the issue, so I came back in case someone like me wanders through with the same issue (likely myself in 2 years when I've forgotten about it - hi, me!).
Turns out if the site does not have a valid SSL cert, Chrome Autofill does not work.
Try the following:
<!DOCTYPE html>
<html>
<body>
<h2>The autocomplete Attribute</h2>
<form action="/action_page.php" autocomplete="on">
First name:<input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
E-mail: <input type="email" name="email" autocomplete="off"><br>
<input type="submit">
</form>
<p>Fill in and submit the form, then reload the page to see how autocomplete works.</p>
<p>Notice that autocomplete is "on" for the form, but "off" for the e-mail field.</p>
</body>
</html>
The above works as I want in Chrome when the site has a valid SSL cert. Saving locally and opening the .html results in Autofill not working.
Autocomplete allows the browser to predict the value. When a user starts to type in a field, the browser should display options to fill in the field, based on earlier typed values.
The autocomplete attribute works with the following types: text, search, url, tel, email, password, datepickers, range, and color.
And It contains only on|off Value for 'autocomplete' attribute.
In some browsers you may need to activate an autocomplete function for this to work (Look under "Preferences" in the browser's menu)
autocomplete works once you submit the data see
https://jsfiddle.net/0x31Loo1/#&togetherjs=CtJMLzM7AP
<form method="post" name="checkout" url="/" autocomplete="on">
<input type="text" name="given-name" />
<input type="text" name="email" />
<input type="submit">
</form>

Google search form turns up mostly white page

I've got this super simple search form on my home page:
<form method="get" action="https://google.ca">
<input type="text" placeholder="" name="q" autofocus>
</form>
When I type into it and press enter, it takes me to Google like I want, but then it just hangs on this white page. Happens in Chrome, Firefox, and Edge.
How can I make a form that successfully searches Google?
you have entered a incorrect URL Address https://www.google.co.in/?q=bacon
You can try this this one:
<form method="get" action="https://www.google.ca/search?">
<input type="text" placeholder="" name="q" autofocus>
</form>

Mobile App executes html scripts

Am testing a mobile app, in one of scenario where there is option to enter text. I have inputted html code say something below and can submit it
Below codes are executed on my mobile app
enter code here
<html>
<body>
<button type="button" onclick="alert('Hello world!')">Click Me!</button>
</body>
</html>
Result: Shows the input and button controls, however button click doesn't show alert
OR
enter code here
<form action="http://google.com" method="get">
First name: <input type="text" name="fname"><br>
<button type="submit">Submit</button><br>
</form>
Result: Shows up input and button click opens targeted external page in the app.
OR
enter code here
<form action="" method="post">
<input name="username" value="admin" />
<input name="password" type="password" value="secret" />
<input name="injected" value="injected" dirname="password" />
<input type="submit">
</form>
I can even embed a youtube video and play it in app.
1.What kind of security threat is it.
2.To What extent does it harm app security.
3.Does it fall under XSS. Any example scripts to pull app info or alert popup would be helpful

HTML Form in ie giving me the problem

<form method='POST' action="some action">
<span>
<input id="foo" type="password" value="Enter Password"/>
<input type="submit" class="go-btn" id="go-button" value="" />
</span>
</form>
This is the HTML form I am using. In IE when I hit the enter key It will open a small window to which says to download something. But When I click the submit button It works fine.
BTW every thing is working fine with Mozilla and Chrome.
Try giving a name to your password input:
<input id="foo" type="password" name="password" value="Enter Password" />
action="some action"
Is most likely your problem. Change this to the page that you want it to go to. (It's trying to send the data to the page "some action" which is causing it to break)