aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/sender
diff options
context:
space:
mode:
authorOsmium Sorcerer <os@sof.beauty>2026-04-07 02:55:26 +0000
committerstonedDiscord <Tukz@gmx.de>2026-05-04 22:56:49 +0200
commit2f57c6c54bceb7d1be061d6f37b501dd6a58eaa4 (patch)
tree959943f8d91464b5d8beae0f7bf61e6262e4f33d /webAO/client/sender
parentfcaee3675fde49e2cd5bb8103d1c1f60863bc42c (diff)
Replace cookies with localStorage
Cookies's use case is to store persistent data and send it to the server in subsequent requests, such as to remember logged-in sessions. WebAO is using them to store site settings like ad-hoc hash tables that require parsing and serialization. As a nasty side-effect of how cookies work, clients send all their settings every time they connect to the server. Server has absolutely no use for them, but each client sends them anyway, which is an uncalled-for privacy leak. Remove this mechanism entirely, switch to localStorage which serves exactly the purpose of per-origin store with data that never leaves the browser.
Diffstat (limited to 'webAO/client/sender')
-rw-r--r--webAO/client/sender/sendOOC.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/webAO/client/sender/sendOOC.ts b/webAO/client/sender/sendOOC.ts
index 43c3773b..d1baaa73 100644
--- a/webAO/client/sender/sendOOC.ts
+++ b/webAO/client/sender/sendOOC.ts
@@ -1,13 +1,12 @@
import { client } from "../../client";
import { escapeChat } from "../../encoding";
-import setCookie from "../../utils/setCookie";
import { saveChatlogHandle } from "../../client/saveChatLogHandle";
/**
* Sends an out-of-character chat message.
* @param {string} message the message to send
*/
export const sendOOC = (message: string) => {
- setCookie(
+ localStorage.setItem(
"OOC_name",
(<HTMLInputElement>document.getElementById("OOC_name")).value,
);