From 039c5ffddaaedbc09bc280af7b97e962467aeed5 Mon Sep 17 00:00:00 2001 From: hawken Date: Thu, 10 Jan 2019 20:32:17 +0000 Subject: [PATCH] Fix 522 --- src/scripts/userpasswordpage.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/scripts/userpasswordpage.js b/src/scripts/userpasswordpage.js index 1743e114b..b8582e3cf 100644 --- a/src/scripts/userpasswordpage.js +++ b/src/scripts/userpasswordpage.js @@ -37,6 +37,11 @@ define(["loading", "libraryMenu", "emby-linkbutton"], function(loading, libraryM var userId = params.userId, currentPassword = view.querySelector("#txtCurrentPassword").value, newPassword = view.querySelector("#txtNewPassword").value; + if(view.querySelector("#fldCurrentPassword").classList.contains("hide")) { + // Firefox does not respect autocomplete=off, so clear it if the field is supposed to be hidden (and blank) + // This should only happen when user.HasConfiguredPassword is false, but this information is not passed on + currentPassword = ""; + } ApiClient.updateUserPassword(userId, currentPassword, newPassword).then(function() { loading.hide(), require(["toast"], function(toast) { toast(Globalize.translate("PasswordSaved")) @@ -93,4 +98,4 @@ define(["loading", "libraryMenu", "emby-linkbutton"], function(loading, libraryM loadUser(view, params) }) } -}); \ No newline at end of file +});