Skip to content

Commit

Permalink
#315 also allow password input with 'insecure' option
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 18, 2024
1 parent 5425c1a commit bebca92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions html5/connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -944,21 +944,21 @@ <h4 class="panel-title">Advanced options</h4>
}
function is_password_safe() {
if (insecure_input.checked) {
return True;
return true;
}
if (!has_session_storage) {
// don't show the password on the URL
// which can be seen in the top bar and captured in the server logs
return False;
return false;
}
const host = document.getElementById("server").value;
return is_secure_connection() || Utilities.isSafeHost(host);
}

function update_password_input() {
const safe = is_password_safe();
password_input.disabled = !safe;
if (!safe) {
password_input.disabled = !safe && !insecure_input.checked;
if (password_input.disabled) {
password_input.value = "";
password_input.title = "Typing a password would be insecure with these settings";
}
Expand Down

0 comments on commit bebca92

Please sign in to comment.