From b42fc95c61da2dbdb4095ebf88afc596b232af4b Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Sat, 8 Nov 2025 11:09:20 +0100 Subject: [PATCH] Change connection ID generation to exclude ambiguous characters - Replace hex-based generation with a new random alphanumeric system - Generated IDs exclude visually similar characters (e.g., 'o', '0', 'I', 'l') --- src/App.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index ba0af1d..e468da4 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -26,9 +26,14 @@ const client = new RondevuClient({ baseUrl: 'https://rondevu.xtrdev.workers.dev' }); -// Generate a random 6-digit hex string +// Generate a random 6-digit string function generateConnectionId() { - return Math.floor(Math.random() * 0xFFFFFF).toString(16).padStart(6, '0').toUpperCase(); + const chars = '23456789abcdefghjkmnopqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ'; + let id = ''; + for (let i = 0; i < 6; i++) { + id += chars.charAt(Math.floor(Math.random() * chars.length)); + } + return id; } function App() {