mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #1599 from keepassxreboot/fix/password_generator_with_older_keepassxc
Fix password generator with KeePassXC version 2.7.0
This commit is contained in:
commit
2a5d45a44f
4 changed files with 18 additions and 5 deletions
|
|
@ -1,3 +1,7 @@
|
|||
1.7.12 (07-04-2022)
|
||||
=========================
|
||||
- Add support for the new password generator with KeePassXC 2.7.0.
|
||||
|
||||
1.7.11 (11-12-2021)
|
||||
=========================
|
||||
- Add new Predefined Sites (FNAC, HP) [#1469]
|
||||
|
|
|
|||
|
|
@ -334,12 +334,16 @@ keepass.generatePassword = async function(tab) {
|
|||
const kpAction = kpActions.GENERATE_PASSWORD;
|
||||
const [ nonce, incrementedNonce ] = keepass.getNonces();
|
||||
|
||||
const request = {
|
||||
const messageData = {
|
||||
action: kpAction,
|
||||
nonce: nonce,
|
||||
clientID: keepass.clientID
|
||||
clientID: keepass.clientID,
|
||||
requestID: keepass.getRequestId(),
|
||||
};
|
||||
|
||||
const request = keepass.buildRequest(kpAction, keepass.encrypt(messageData, nonce), nonce, messageData.clientID);
|
||||
request["requestID"] = messageData.requestID;
|
||||
|
||||
const response = await keepass.sendNativeMessage(request);
|
||||
if (response.message && response.nonce) {
|
||||
const res = keepass.decrypt(response.message, response.nonce);
|
||||
|
|
@ -902,6 +906,11 @@ keepass.generateNewKeyPair = function() {
|
|||
//console.log(nacl.util.encodeBase64(keepass.keyPair.publicKey) + ' ' + nacl.util.encodeBase64(keepass.keyPair.secretKey));
|
||||
};
|
||||
|
||||
// Creates a random 8 character string for Request ID
|
||||
keepass.getRequestId = function() {
|
||||
return Math.random().toString(16).substring(2, 10);
|
||||
};
|
||||
|
||||
keepass.isConfigured = async function() {
|
||||
if (typeof(keepass.databaseHash) === 'undefined') {
|
||||
const hash = keepass.getDatabaseHash();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "KeePassXC-Browser",
|
||||
"version": "1.7.11",
|
||||
"version_name": "1.7.11",
|
||||
"version": "1.7.12",
|
||||
"version_name": "1.7.12",
|
||||
"description": "__MSG_extensionDescription__",
|
||||
"author": "KeePassXC Team",
|
||||
"icons": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "KeePassXC-Browser",
|
||||
"version": "1.7.11",
|
||||
"version": "1.7.12",
|
||||
"description": "KeePassXC-Browser",
|
||||
"main": "build.js",
|
||||
"devDependencies": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue