-
-
-
-
-
+
+
-
+
Authentication Failed. Please Try Again...
diff --git a/src/js/main.js b/src/js/main.js
index 217bb01..8dab34c 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -3,7 +3,9 @@
import { showToast } from './export.js'
if (typeof ClipboardJS !== 'undefined') {
- const clipboard = new ClipboardJS('.clip')
+ const clipboard = new ClipboardJS(
+ '[data-clipboard-text],[data-clipboard-target]'
+ )
clipboard.on('success', function (event) {
// console.debug('clipboard.success:', event)
const text = event.text.trim()
From 752911d87bf3e71c6718f6a7910b53f247539b3a Mon Sep 17 00:00:00 2001
From: Shane <6071159+smashedr@users.noreply.github.com>
Date: Wed, 21 Aug 2024 17:02:04 -0700
Subject: [PATCH 09/13] Fix getHost Function
---
src/js/options.js | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/js/options.js b/src/js/options.js
index 44920ca..e6a8763 100644
--- a/src/js/options.js
+++ b/src/js/options.js
@@ -313,20 +313,16 @@ async function editSubmit(event) {
/**
* @function getHost
- * @param host
+ * @param {String} host
* @return {String}
*/
function getHost(host) {
host = host.toLowerCase().trim()
- try {
- const url = new URL(host)
- return url.host
- } catch (e) {} // eslint-disable-line no-empty
- try {
- const url = new URL('https://' + host)
- return url.host
- } catch (e) {} // eslint-disable-line no-empty
- throw new Error('Unable to validate hostname')
+ host = host.includes('://') ? host : 'https://' + host
+ console.debug('host:', host)
+ const url = new URL(host)
+ console.debug('url.host:', url.host)
+ return url.host
}
/**
From 272249aaa20d62ff7394046c0ef8cf382400d7e4 Mon Sep 17 00:00:00 2001
From: Shane <6071159+smashedr@users.noreply.github.com>
Date: Wed, 21 Aug 2024 17:20:37 -0700
Subject: [PATCH 10/13] Ensure Non-Empty Hostname
---
src/js/options.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/js/options.js b/src/js/options.js
index e6a8763..13bc8d7 100644
--- a/src/js/options.js
+++ b/src/js/options.js
@@ -313,15 +313,18 @@ async function editSubmit(event) {
/**
* @function getHost
- * @param {String} host
+ * @param {String} hostname
* @return {String}
*/
-function getHost(host) {
- host = host.toLowerCase().trim()
+function getHost(hostname) {
+ let host = hostname.toLowerCase().trim()
host = host.includes('://') ? host : 'https://' + host
console.debug('host:', host)
const url = new URL(host)
console.debug('url.host:', url.host)
+ if (!url.host) {
+ throw new Error(`Invalid Hostname: ${hostname}`)
+ }
return url.host
}
From b416d918c4944cb0572cdc6da11959f635cabd5b Mon Sep 17 00:00:00 2001
From: Shane <6071159+smashedr@users.noreply.github.com>
Date: Wed, 21 Aug 2024 18:09:33 -0700
Subject: [PATCH 11/13] Update README.md for SW Issues
---
README.md | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 1f6fd0d..f424854 100644
--- a/README.md
+++ b/README.md
@@ -79,7 +79,11 @@ Long-term Goals for Improved Security:
* Only allows saving 1 set of credentials per host
* Most browsers will offer to save passwords on login and edit
-* Firefox: May cache a 401 and not prompt for auth, use `Ctrl+F5` or clear cache
+* A 401 response from a Service Worker is not properly intercepted:
+ - Firefox: Shows a generic 401 page, use `Ctrl+F5`
+ * Once credentials are saved, requests will work as normal.
+ - Chrome: Shows a default credentials prompt, Cancel and press `Ctrl+F5`
+ * This behavior may continue after saving credentials.
> [!TIP]
> **Don't see your issue here?**
From a4ee69aa5578c540e77f6d42223777880dc7f504 Mon Sep 17 00:00:00 2001
From: Shane <6071159+smashedr@users.noreply.github.com>
Date: Wed, 21 Aug 2024 18:12:27 -0700
Subject: [PATCH 12/13] Fix Copy Pasta
---
src/html/options.html | 4 ++--
src/html/popup.html | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/html/options.html b/src/html/options.html
index 1901f02..878c453 100644
--- a/src/html/options.html
+++ b/src/html/options.html
@@ -17,9 +17,9 @@
-

+
- Cache Cleaner
+ Auto Auth
v
diff --git a/src/html/popup.html b/src/html/popup.html
index 51eeb94..d0e7769 100644
--- a/src/html/popup.html
+++ b/src/html/popup.html
@@ -16,7 +16,7 @@
-

+
From 38385116c6a6c5242e39a023b44ee2e7d8cd2f3b Mon Sep 17 00:00:00 2001
From: Shane <6071159+smashedr@users.noreply.github.com>
Date: Wed, 21 Aug 2024 18:36:39 -0700
Subject: [PATCH 13/13] Update Dependencies
---
package-lock.json | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index a8fdbcc..16de9ca 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -682,9 +682,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
- "version": "22.4.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.4.0.tgz",
- "integrity": "sha512-49AbMDwYUz7EXxKU/r7mXOsxwFr4BYbvB7tWYxVuLdb2ibd30ijjXINSMAHiEEZk5PCRBmW1gUeisn2VMKt3cQ==",
+ "version": "22.5.0",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.0.tgz",
+ "integrity": "sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1505,9 +1505,9 @@
}
},
"node_modules/async": {
- "version": "3.2.5",
- "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz",
- "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==",
+ "version": "3.2.6",
+ "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
+ "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
"dev": true,
"license": "MIT"
},
@@ -5274,9 +5274,9 @@
}
},
"node_modules/is-core-module": {
- "version": "2.15.0",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz",
- "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==",
+ "version": "2.15.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",
+ "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -9200,9 +9200,9 @@
}
},
"node_modules/spdx-license-ids": {
- "version": "3.0.18",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz",
- "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==",
+ "version": "3.0.20",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz",
+ "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==",
"dev": true,
"license": "CC0-1.0"
},
@@ -9466,9 +9466,9 @@
"license": "MIT"
},
"node_modules/streamx": {
- "version": "2.18.0",
- "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.18.0.tgz",
- "integrity": "sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==",
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.19.0.tgz",
+ "integrity": "sha512-5z6CNR4gtkPbwlxyEqoDGDmWIzoNJqCBt4Eac1ICP9YaIT08ct712cFj0u1rx4F8luAuL+3Qc+RFIdI4OX00kg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -10101,9 +10101,9 @@
"license": "MIT"
},
"node_modules/undici-types": {
- "version": "6.19.6",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.6.tgz",
- "integrity": "sha512-e/vggGopEfTKSvj4ihnOLTsqhrKRN3LeO6qSN/GxohhuRv8qH9bNQ4B8W7e/vFL+0XTnmHPB4/kegunZGA4Org==",
+ "version": "6.19.8",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
+ "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},