diff --git a/extensions/dist/gnexus-creds-extension-chrome-0.2.3.zip b/extensions/dist/gnexus-creds-extension-chrome-0.2.3.zip deleted file mode 100644 index b152bf4..0000000 --- a/extensions/dist/gnexus-creds-extension-chrome-0.2.3.zip +++ /dev/null Binary files differ diff --git a/extensions/dist/gnexus-creds-extension-chrome-0.2.4.zip b/extensions/dist/gnexus-creds-extension-chrome-0.2.4.zip new file mode 100644 index 0000000..a890765 --- /dev/null +++ b/extensions/dist/gnexus-creds-extension-chrome-0.2.4.zip Binary files differ diff --git a/extensions/dist/gnexus-creds-extension-firefox-0.2.3.zip b/extensions/dist/gnexus-creds-extension-firefox-0.2.3.zip deleted file mode 100644 index 6ebde32..0000000 --- a/extensions/dist/gnexus-creds-extension-firefox-0.2.3.zip +++ /dev/null Binary files differ diff --git a/extensions/dist/gnexus-creds-extension-firefox-0.2.4.zip b/extensions/dist/gnexus-creds-extension-firefox-0.2.4.zip new file mode 100644 index 0000000..3063461 --- /dev/null +++ b/extensions/dist/gnexus-creds-extension-firefox-0.2.4.zip Binary files differ diff --git a/extensions/extension/Makefile b/extensions/extension/Makefile index 42d8825..c6af4f7 100644 --- a/extensions/extension/Makefile +++ b/extensions/extension/Makefile @@ -1,5 +1,5 @@ NAME := gnexus-creds-extension -VERSION := 0.2.3 +VERSION := 0.2.4 # Per-file prerequisites: a directory prerequisite (plain "src") never goes # stale when only a file inside it is edited. SRC := manifest.json $(shell find src icons lib -type f) diff --git a/extensions/extension/manifest.json b/extensions/extension/manifest.json index 3364cf7..d879425 100644 --- a/extensions/extension/manifest.json +++ b/extensions/extension/manifest.json @@ -1,9 +1,9 @@ { "manifest_version": 3, "name": "GNEXUS CREDS", - "version": "0.2.3", - "description": "Browser extension for gnexus-creds secret manager.", - "permissions": ["storage", "activeTab", "alarms"], + "version": "0.2.4", + "description": "Save and autofill passwords from your GNEXUS CREDS vault.", + "permissions": ["storage", "alarms"], "host_permissions": ["https://*/*", "http://*/*"], "background": { "service_worker": "src/background.js", diff --git a/extensions/extension/src/api.js b/extensions/extension/src/api.js index ae6cf5f..9cd1a42 100644 --- a/extensions/extension/src/api.js +++ b/extensions/extension/src/api.js @@ -2,7 +2,10 @@ * API client for gnexus-creds REST API. */ async function request(path, options = {}, token, baseUrl) { - const url = `${baseUrl}${path}`; + // the stored URL may carry a trailing slash ("/creds/") — joining it with + // an absolute path would produce "//api/v1/..." (and stray 405s on some + // servers), so it is stripped here, at the single URL-building place + const url = `${String(baseUrl || "").replace(/\/+$/, "")}${path}`; const headers = { Accept: "application/json", ...(options.body ? { "Content-Type": "application/json" } : {}), diff --git a/extensions/extension/src/background.js b/extensions/extension/src/background.js index 81c61b1..8aa8fe2 100644 --- a/extensions/extension/src/background.js +++ b/extensions/extension/src/background.js @@ -212,6 +212,10 @@ await setSettings(message.payload); invalidateCache(); sendResponse({ ok: true }); + // the server may offer a different design pack than the one this + // install fetched before (default baseUrl) — try it now, 12h is + // too long to wait for a URL the user just changed + refreshDesignPack("settings"); break; case "VERIFY_TOKEN": { @@ -332,9 +336,12 @@ } } catch (err) { // 401 from any API call means the stored token no longer works — - // remember it for the popup; a successful VERIFY_TOKEN clears it + // remember it for the popup AND drop the session cache: otherwise + // GET_SECRETS_FOR_DOMAIN keeps feeding the autofill card secrets + // fetched with the now-dead token for up to 5 more minutes if (err?.status === 401) { await setTokenInvalid(true).catch(() => {}); + await invalidateCache().catch(() => {}); } sendResponse({ ok: false, error: err.message, status: err.status }); } diff --git a/extensions/extension/src/content.js b/extensions/extension/src/content.js index 757c5ef..ebef28f 100644 --- a/extensions/extension/src/content.js +++ b/extensions/extension/src/content.js @@ -234,7 +234,8 @@ try { const revealed = await send("REVEAL_SECRET", { id: secretId }); const fields = revealed.fields || []; - const userField = fields.find((f) => /user|login|email/i.test(f.name)); + // names cover both english and russian-named field dicts + const userField = fields.find((f) => /user|login|email|логин|почта/i.test(f.name)); const passField = fields.find((f) => /pass|password|пароль/i.test(f.name)); if (userField && usernameInput) { usernameInput.value = userField.value || ""; diff --git a/extensions/manifest.json b/extensions/manifest.json index 013f10b..56b0dcf 100644 --- a/extensions/manifest.json +++ b/extensions/manifest.json @@ -1,19 +1,19 @@ { - "version": "0.2.3", + "version": "0.2.4", "released_at": "2026-10-03T00:00:00Z", - "notes": "Save-settings feedback moved to a toast that survives the drawer closing and is never clipped; the popup got a proper localized title (GNEXUS CREDS — Password vault).", + "notes": "Save-settings feedback moved to a toast that survives the drawer closing and is never clipped; the settings drawer reopens correctly after a close once closed; localized popup title; trailing-slash-safe URL building; the design pack refetches when the server URL changes.", "builds": [ { "browser": "chrome", - "filename": "gnexus-creds-extension-chrome-0.2.3.zip", - "sha256": "b2a8215865dcb30123790e31ce04c4d7119585a573166dcec89b60835fabf481", - "size": 5062536 + "filename": "gnexus-creds-extension-chrome-0.2.4.zip", + "sha256": "f562ef0bdae30dce3efad6cfa08f41ac8255026832892c4ff2644e74c64a641b", + "size": 5062904 }, { "browser": "firefox", - "filename": "gnexus-creds-extension-firefox-0.2.3.zip", - "sha256": "38a79a5e0dc94a50a68a413c7ad15d311cc792494d647a4d44964bfdda183e41", - "size": 5061624 + "filename": "gnexus-creds-extension-firefox-0.2.4.zip", + "sha256": "7a88dcdf9f2fbf08ff9cae8b363facb98666a0c3994b2c96b08d35ba892705cc", + "size": 5061964 } ] } \ No newline at end of file