Skip to content

Commit

Permalink
Add cookies permission to all manifests (keepassxreboot#2134)
Browse files Browse the repository at this point in the history
Add cookies permission to all manifests
  • Loading branch information
varjolintu authored Mar 7, 2024
1 parent 71a7782 commit 14f2c9a
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 81 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.9.0.1 (2024-03-06)
=========================
- Add cookies permission to missing manifest file [#2134]
- Fix showing filter logins input in the extension popup [#2137]

1.9.0 (2024-03-04)
=========================
- Add support for Manifest V3 with Chromium-based browsers [#1723]
Expand Down
30 changes: 23 additions & 7 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,33 @@ const BROWSERS = {
'Chromium': 'manifest_chromium.json',
};

async function getDestinationFilename(manifest) {
const getVersion = async () => {
const manifestFile = await fs.readFile(DEFAULT, { encoding: 'utf8' });
const data = JSON.parse(manifestFile);
const browser = manifest.substring(manifest.indexOf('_') + 1, manifest.indexOf('.'));
return data['version'];
};

const setVersion = async (manifest, version) => {
const manifestFile = await fs.readFile(manifest, { encoding: 'utf8' });
const data = JSON.parse(manifestFile);

data['version'] = version;
if (Object.hasOwn(data, 'version_name')) {
data['version_name'] = version;
}
fs.writeFile(manifest, JSON.stringify(data, null, 4));
};

return `keepassxc-browser_${data['version']}_${browser}.zip`;
}
const getDestinationFilename = async (manifest, version) => {
const browser = manifest.substring(manifest.indexOf('_') + 1, manifest.indexOf('.'));
return `keepassxc-browser_${version}_${browser}.zip`;
};

async function updateTranslations() {
const updateTranslations = async () => {
console.log('Pulling translations from Transifex, please wait...');
const { stdout } = await exec('tx pull -af');
console.log(stdout);
}
};

(async() => {
const params = process.argv.slice(2);
Expand All @@ -34,11 +48,13 @@ async function updateTranslations() {
}

await fs.copyFile(`${DEST}/manifest.json`, `./${DEFAULT}`);
const version = await getVersion();

for (const browser in BROWSERS) {
console.log(`KeePassXC-Browser: Creating extension package for ${browser}`);

const fileName = await getDestinationFilename(BROWSERS[browser]);
const fileName = await getDestinationFilename(BROWSERS[browser], version);
setVersion(`./dist/${BROWSERS[browser]}`, version);
await fs.copyFile(`./dist/${BROWSERS[browser]}`, `${DEST}/manifest.json`);

if (await fs.exists(fileName)) {
Expand Down
7 changes: 4 additions & 3 deletions dist/manifest_chromium.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"manifest_version": 3,
"name": "KeePassXC-Browser",
"version": "1.9.0",
"version_name": "1.9.0",
"version": "1.9.0.1",
"version_name": "1.9.0.1",
"minimum_chrome_version": "93",
"description": "__MSG_extensionDescription__",
"author": "KeePassXC Team",
Expand Down Expand Up @@ -138,8 +138,9 @@
}],
"permissions": [
"activeTab",
"contextMenus",
"clipboardWrite",
"contextMenus",
"cookies",
"nativeMessaging",
"notifications",
"storage",
Expand Down
5 changes: 3 additions & 2 deletions dist/manifest_firefox.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "KeePassXC-Browser",
"version": "1.9.0",
"version": "1.9.0.1",
"description": "__MSG_extensionDescription__",
"author": "KeePassXC Team",
"icons": {
Expand Down Expand Up @@ -142,8 +142,9 @@
],
"permissions": [
"activeTab",
"contextMenus",
"clipboardWrite",
"contextMenus",
"cookies",
"nativeMessaging",
"notifications",
"storage",
Expand Down
18 changes: 9 additions & 9 deletions keepassxc-browser/_locales/bg/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,39 +148,39 @@
"description": "Invalid URL provided."
},
"errorMessagePasskeysOriginNotAllowed": {
"message": "Origin is empty or not allowed.",
"message": "Източникът е празен или забранен.",
"description": "Origin is empty or not allowed."
},
"errorMessagePasskeysDomainNotValid": {
"message": "Effective domain is not a valid domain.",
"message": "Ефективният домейн не е приемлив домейн.",
"description": "Effective domain is not a valid domain."
},
"errorMessagePasskeysDomainRpIdMismatch": {
"message": "Origin and RP ID do not match.",
"message": "Източникът и RP ID не съвпадат.",
"description": "Origin and RP ID do not match."
},
"errorMessagePasskeysNoSupportedAlgorithms": {
"message": "No supported algorithms were provided.",
"message": "Не са предоставени поддържани алгоритми.",
"description": "No supported algorithms were provided."
},
"errorMessagePasskeysWaitforLifeTimer": {
"message": "Wait for timer to expire.",
"message": "Изчакайте отброяването да приключи.",
"description": "Wait for timer to expire."
},
"errorMessagePasskeysUnknownError": {
"message": "Unknown Passkeys error.",
"message": "Неочаквана грешка на Passkey.",
"description": "Unknown Passkeys error."
},
"errorMessagePasskeysInvalidChallenge": {
"message": "Challenge is shorter than required minimum length.",
"message": "Предизвикването е по-късо от изискваната минимална дължина.",
"description": "Challenge is shorter than required minimum length."
},
"errorMessagePasskeysInvalidUserId": {
"message": "user.id does not match the required length.",
"message": "user.id не отговаря на изискваната дължина.",
"description": "user.id does not match the required length."
},
"errorMessagePasskeysContextIsNotSecure": {
"message": "Context is not secure.",
"message": "Контекстът не е сигурен.",
"description": "Context is not secure."
},
"errorNotConnected": {
Expand Down
18 changes: 9 additions & 9 deletions keepassxc-browser/_locales/nl/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,39 +148,39 @@
"description": "Invalid URL provided."
},
"errorMessagePasskeysOriginNotAllowed": {
"message": "Origin is empty or not allowed.",
"message": "De oorsprong is leeg of niet toegestaan.",
"description": "Origin is empty or not allowed."
},
"errorMessagePasskeysDomainNotValid": {
"message": "Effective domain is not a valid domain.",
"message": "Effectief domein is geen geldig domein.",
"description": "Effective domain is not a valid domain."
},
"errorMessagePasskeysDomainRpIdMismatch": {
"message": "Origin and RP ID do not match.",
"message": "Oorsprong en RP ID komen niet overeen.",
"description": "Origin and RP ID do not match."
},
"errorMessagePasskeysNoSupportedAlgorithms": {
"message": "No supported algorithms were provided.",
"message": "Geen ondersteunde algoritmes zijn verstrekt.",
"description": "No supported algorithms were provided."
},
"errorMessagePasskeysWaitforLifeTimer": {
"message": "Wait for timer to expire.",
"message": "Wacht tot de timer verloopt.",
"description": "Wait for timer to expire."
},
"errorMessagePasskeysUnknownError": {
"message": "Unknown Passkeys error.",
"message": "Onbekende Passkeys-fout.",
"description": "Unknown Passkeys error."
},
"errorMessagePasskeysInvalidChallenge": {
"message": "Challenge is shorter than required minimum length.",
"message": "De challenge is korter dan de vereiste minimale lengte.",
"description": "Challenge is shorter than required minimum length."
},
"errorMessagePasskeysInvalidUserId": {
"message": "user.id does not match the required length.",
"message": "user.id voldoet niet aan de vereiste lengte.",
"description": "user.id does not match the required length."
},
"errorMessagePasskeysContextIsNotSecure": {
"message": "Context is not secure.",
"message": "Context is niet veilig.",
"description": "Context is not secure."
},
"errorNotConnected": {
Expand Down
18 changes: 9 additions & 9 deletions keepassxc-browser/_locales/pl/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,39 +148,39 @@
"description": "Invalid URL provided."
},
"errorMessagePasskeysOriginNotAllowed": {
"message": "Origin is empty or not allowed.",
"message": "Źródło jest puste lub niedozwolone.",
"description": "Origin is empty or not allowed."
},
"errorMessagePasskeysDomainNotValid": {
"message": "Effective domain is not a valid domain.",
"message": "Domena efektywna nie jest domeną prawidłową.",
"description": "Effective domain is not a valid domain."
},
"errorMessagePasskeysDomainRpIdMismatch": {
"message": "Origin and RP ID do not match.",
"message": "Źródło i identyfikator RP nie są zgodne.",
"description": "Origin and RP ID do not match."
},
"errorMessagePasskeysNoSupportedAlgorithms": {
"message": "No supported algorithms were provided.",
"message": "Nie zapewniono obsługiwanych algorytmów.",
"description": "No supported algorithms were provided."
},
"errorMessagePasskeysWaitforLifeTimer": {
"message": "Wait for timer to expire.",
"message": "Poczekaj, aż upłynie limit czasu.",
"description": "Wait for timer to expire."
},
"errorMessagePasskeysUnknownError": {
"message": "Unknown Passkeys error.",
"message": "Nieznany błąd klucza dostępu.",
"description": "Unknown Passkeys error."
},
"errorMessagePasskeysInvalidChallenge": {
"message": "Challenge is shorter than required minimum length.",
"message": "Wyzwanie jest krótsze niż wymagana długość minimalna.",
"description": "Challenge is shorter than required minimum length."
},
"errorMessagePasskeysInvalidUserId": {
"message": "user.id does not match the required length.",
"message": "user.id nie ma wymaganej długości.",
"description": "user.id does not match the required length."
},
"errorMessagePasskeysContextIsNotSecure": {
"message": "Context is not secure.",
"message": "Kontekst nie jest bezpieczny.",
"description": "Context is not secure."
},
"errorNotConnected": {
Expand Down
20 changes: 10 additions & 10 deletions keepassxc-browser/_locales/ru/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,39 +148,39 @@
"description": "Invalid URL provided."
},
"errorMessagePasskeysOriginNotAllowed": {
"message": "Origin is empty or not allowed.",
"message": "Источник пуст или не разрешен.",
"description": "Origin is empty or not allowed."
},
"errorMessagePasskeysDomainNotValid": {
"message": "Effective domain is not a valid domain.",
"message": "Эффективный домен не является действительным доменом.",
"description": "Effective domain is not a valid domain."
},
"errorMessagePasskeysDomainRpIdMismatch": {
"message": "Origin and RP ID do not match.",
"message": "Источник и идентификатор RP не совпадают.",
"description": "Origin and RP ID do not match."
},
"errorMessagePasskeysNoSupportedAlgorithms": {
"message": "No supported algorithms were provided.",
"message": "Не было предоставлено никаких поддерживаемых алгоритмов.",
"description": "No supported algorithms were provided."
},
"errorMessagePasskeysWaitforLifeTimer": {
"message": "Wait for timer to expire.",
"message": "Дождитесь истечения таймера.",
"description": "Wait for timer to expire."
},
"errorMessagePasskeysUnknownError": {
"message": "Unknown Passkeys error.",
"message": "Неизвестная ошибка Passkeys.",
"description": "Unknown Passkeys error."
},
"errorMessagePasskeysInvalidChallenge": {
"message": "Challenge is shorter than required minimum length.",
"message": "Вызов короче требуемой минимальной длины.",
"description": "Challenge is shorter than required minimum length."
},
"errorMessagePasskeysInvalidUserId": {
"message": "user.id does not match the required length.",
"message": "user.id не соответствует требуемой длине.",
"description": "user.id does not match the required length."
},
"errorMessagePasskeysContextIsNotSecure": {
"message": "Context is not secure.",
"message": "Контекст небезопасен.",
"description": "Context is not secure."
},
"errorNotConnected": {
Expand Down Expand Up @@ -208,7 +208,7 @@
"description": "Password icon title text."
},
"passwordGeneratorNotSupported": {
"message": "Launching the password generator is not supported in this KeePassXC version. Please update KeePassXC to a newer version."
"message": "Запуск генератора паролей не поддерживается в этой версии KeePassXC. Пожалуйста, обновите KeePassXC до более новой версии."
},
"usernameFieldText": {
"message": "Заполнить учётные данные из KeePassXC",
Expand Down
18 changes: 9 additions & 9 deletions keepassxc-browser/_locales/sv/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,39 +148,39 @@
"description": "Invalid URL provided."
},
"errorMessagePasskeysOriginNotAllowed": {
"message": "Origin is empty or not allowed.",
"message": "Ursprung är tomt eller inte tillåtet.",
"description": "Origin is empty or not allowed."
},
"errorMessagePasskeysDomainNotValid": {
"message": "Effective domain is not a valid domain.",
"message": "Effektiv domän är inte en giltig domän.",
"description": "Effective domain is not a valid domain."
},
"errorMessagePasskeysDomainRpIdMismatch": {
"message": "Origin and RP ID do not match.",
"message": "Ursprung och RP-ID matchar inte.",
"description": "Origin and RP ID do not match."
},
"errorMessagePasskeysNoSupportedAlgorithms": {
"message": "No supported algorithms were provided.",
"message": "Inga algoritmer som stöds tillhandahölls.",
"description": "No supported algorithms were provided."
},
"errorMessagePasskeysWaitforLifeTimer": {
"message": "Wait for timer to expire.",
"message": "Vänta på att tiduret skall löpa ut.",
"description": "Wait for timer to expire."
},
"errorMessagePasskeysUnknownError": {
"message": "Unknown Passkeys error.",
"message": "Okänt passnyckelfel.",
"description": "Unknown Passkeys error."
},
"errorMessagePasskeysInvalidChallenge": {
"message": "Challenge is shorter than required minimum length.",
"message": "Utmaningen är kortare än den minimilängd som krävs.",
"description": "Challenge is shorter than required minimum length."
},
"errorMessagePasskeysInvalidUserId": {
"message": "user.id does not match the required length.",
"message": "user.id matchar inte den erforderliga längden.",
"description": "user.id does not match the required length."
},
"errorMessagePasskeysContextIsNotSecure": {
"message": "Context is not secure.",
"message": "Kontexten är inte säker.",
"description": "Context is not secure."
},
"errorNotConnected": {
Expand Down
Loading

0 comments on commit 14f2c9a

Please sign in to comment.