mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 04:39:03 +02:00
* Add a new module, NewPasswordModel.jsm, which imports the Fathom library from Bug 1618956, and copies over the Fathom model at [bff6995c32e86...](bff6995c32/new-password/rulesets.js (L6-L272)) into it.
* This module is intended to make it as easy as possible to import model updates from the upstream GitHub repo, though there are a couple extra steps beyond a simple copy and paste.
* The module is imported into LoginAutoComplete.jsm, which has a new helper, _isProbablyANewPasswordField, which runs the model against the provided input element and returns true if the element's confidence score is greater than or equal to a threshold.
* The confidence threshold, specified by the new signon.generation.confidenceThreshold string preference, is currently set to 0.5 based on [this comment](https://bugzilla.mozilla.org/show_bug.cgi?id=1595244#c12).
* This should result in a dramatic reduction in false negative rates compared to the existing implementation of this feature (at the expense of an increase in the false positive rate of the existing feature from ~0% to hopefully around 2%).
* Use of the model is gated behind the same preference used for the confidence threshold, signon.generation.confidenceThreshold.
* This is a string pref that disables the model if its value is "-1". Otherwise, its value should be a string representation of a float [0,1] (e.g. "0.5") which indicates that the model should be enabled with the given confidence threshold.
* Using the model is enabled by default on desktop but disabled by default on mobile (GeckoView) due to Bug 1618058.
* Fixed some existing tests that were broken as a result of this change.
* New test(s) will be added in a subsequent commit.
Differential Revision: https://phabricator.services.mozilla.com/D67068
--HG--
extra : moz-landing-system : lando
77 lines
1.9 KiB
Python
77 lines
1.9 KiB
Python
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
|
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
|
|
|
|
MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
|
|
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
|
|
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
|
|
|
|
TESTING_JS_MODULES += [
|
|
'test/LoginTestUtils.jsm',
|
|
]
|
|
|
|
XPIDL_SOURCES += [
|
|
'nsILoginAutoCompleteSearch.idl',
|
|
'nsILoginInfo.idl',
|
|
'nsILoginManager.idl',
|
|
'nsILoginManagerAuthPrompter.idl',
|
|
'nsILoginManagerCrypto.idl',
|
|
'nsILoginManagerPrompter.idl',
|
|
'nsILoginManagerStorage.idl',
|
|
'nsILoginMetaInfo.idl',
|
|
]
|
|
|
|
XPIDL_MODULE = 'loginmgr'
|
|
|
|
EXTRA_JS_MODULES += [
|
|
'crypto-SDR.js',
|
|
'InsecurePasswordUtils.jsm',
|
|
'LoginAutoComplete.jsm',
|
|
'LoginFormFactory.jsm',
|
|
'LoginHelper.jsm',
|
|
'LoginInfo.jsm',
|
|
'LoginManager.jsm',
|
|
'LoginManagerAuthPrompter.jsm',
|
|
'LoginManagerChild.jsm',
|
|
'LoginManagerParent.jsm',
|
|
'LoginManagerPrompter.jsm',
|
|
'LoginRecipes.jsm',
|
|
'NewPasswordModel.jsm',
|
|
'OSCrypto.jsm',
|
|
'storage-json.js',
|
|
]
|
|
|
|
if CONFIG['OS_TARGET'] == 'Android':
|
|
EXTRA_JS_MODULES += [
|
|
'storage-geckoview.js',
|
|
]
|
|
else:
|
|
EXTRA_JS_MODULES += [
|
|
'LoginImport.jsm',
|
|
'LoginStore.jsm',
|
|
'PasswordGenerator.jsm',
|
|
]
|
|
|
|
if CONFIG['OS_TARGET'] == 'WINNT':
|
|
EXTRA_JS_MODULES += [
|
|
'OSCrypto_win.js',
|
|
]
|
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'browser' or CONFIG['MOZ_SUITE']:
|
|
EXTRA_JS_MODULES += [
|
|
'LoginManagerContextMenu.jsm',
|
|
]
|
|
|
|
XPCOM_MANIFESTS += [
|
|
'components.conf',
|
|
]
|
|
|
|
JAR_MANIFESTS += ['jar.mn']
|
|
|
|
with Files('**'):
|
|
BUG_COMPONENT = ('Toolkit', 'Password Manager')
|