Merge pull request #2741 from thelounge/xpaw/firefox-save-pass

Fix passwords not being saved in Firefox
This commit is contained in:
Jérémie Astori 2018-09-03 00:42:57 -04:00 committed by GitHub
commit 7c12883dc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -3,11 +3,11 @@
<img src="img/logo-vertical-transparent-bg-inverted.svg" class="logo-inverted" alt="The Lounge" width="256" height="170">
<label>Username</label>
<input class="input" name="user" autocapitalize="none" autofocus>
<input class="input" type="text" name="user" autocapitalize="none" autocorrect="off" autocomplete="username" required autofocus>
<div class="password-container">
<label>Password</label>
<input class="input" type="password" name="password">
<input class="input" type="password" name="password" autocapitalize="none" autocorrect="off" autocomplete="current-password" required>
{{> ../reveal-password}}
</div>

View File

@ -245,7 +245,7 @@ function index(req, res, next) {
const policies = [
"default-src 'none'", // default to nothing
"form-action 'none'", // no default-src fallback
"form-action 'self'", // 'self' to fix saving passwords in Firefox, even though login is handled in javascript
"connect-src 'self' ws: wss:", // allow self for polling; websockets
"style-src 'self' https: 'unsafe-inline'", // allow inline due to use in irc hex colors
"script-src 'self'", // javascript