Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Properly detect active password manager by calling getSettings (which…
Browse files Browse the repository at this point in the history
… has the logic to default if not set).

Previous code would fail for anyone who had a session before PW manager was simplified down to a single choice, because they did not have ACTIVE_PASSWORD_MANAGER set.

Auditors: @dandart

Fixes #3516
  • Loading branch information
bsclifton committed Aug 29, 2016
1 parent 4d0b42d commit 30f0f79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/state/contentSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const {passwordManagers, defaultPasswordManager} = require('../constants/passwor
const urlParse = require('url').parse
const siteSettings = require('./siteSettings')
const { registerUserPrefs } = require('./userPrefs')
const { getSetting } = require('../settings')

// backward compatibility with appState siteSettings
const parseSiteSettingsPattern = (pattern) => {
Expand All @@ -32,7 +33,7 @@ const addContentSettings = (settingList, hostPattern, secondaryPattern = undefin
const getPasswordManagerEnabled = (appState) => {
let appSettings = appState.get('settings')
if (appSettings) {
const passwordManager = appSettings.get(settings.ACTIVE_PASSWORD_MANAGER)
const passwordManager = getSetting(settings.ACTIVE_PASSWORD_MANAGER, appSettings)
if (typeof passwordManager === 'string') {
return passwordManager === passwordManagers.BUILT_IN
}
Expand Down

0 comments on commit 30f0f79

Please sign in to comment.