From 4ba3bbc4f123107a6103e26db757b434b56c9607 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 17 Jul 2025 19:51:31 -0500 Subject: [PATCH] Revert "Linux wet the bed on this, trim whitespace and ensure 8-bit values" This reverts commit 3940d9d60f7018e9911688c5bf0d9e6c569213aa. --- app/javascript/controllers/notifications_controller.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/javascript/controllers/notifications_controller.js b/app/javascript/controllers/notifications_controller.js index 2d7dc65eb..eff1f888d 100644 --- a/app/javascript/controllers/notifications_controller.js +++ b/app/javascript/controllers/notifications_controller.js @@ -79,8 +79,6 @@ export default class extends Controller { // VAPID public key comes encoded as base64 but service worker registration needs it as a Uint8Array #urlBase64ToUint8Array(base64String) { - base64String = base64String.trim() - const padding = "=".repeat((4 - base64String.length % 4) % 4) const base64 = (base64String + padding).replace(/-/g, "+").replace(/_/g, "/") @@ -88,7 +86,7 @@ export default class extends Controller { const outputArray = new Uint8Array(rawData.length) for (let i = 0; i < rawData.length; ++i) { - outputArray[i] = rawData.charCodeAt(i) & 0xff + outputArray[i] = rawData.charCodeAt(i) } return outputArray