From 22c00aca95bd60586caf08e8737fcc7952b6638b Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sat, 3 Jun 2017 21:41:21 +0300 Subject: [PATCH] Do not store passwords in settings storage --- client/js/options.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/js/options.js b/client/js/options.js index 85cf2fc2..81f81e2b 100644 --- a/client/js/options.js +++ b/client/js/options.js @@ -44,10 +44,13 @@ for (var i in options) { } settings.on("change", "input, select, textarea", function() { - var self = $(this); - var name = self.attr("name"); + const self = $(this); + const type = self.attr("type"); + const name = self.attr("name"); - if (self.attr("type") === "checkbox") { + if (type === "password") { + return; + } else if (type === "checkbox") { options[name] = self.prop("checked"); } else { options[name] = self.val();