From 556c16e3f293e91d37c76b4a41a95273cd613b44 Mon Sep 17 00:00:00 2001 From: lenovo Date: Wed, 7 Dec 2022 15:42:36 +0100 Subject: [PATCH] wip chat rooms can now create new room with prompt --- README.md | 4 ++ tests_hugo/chat_node/chat_client/chat.html | 40 +++++++++---------- .../chat_node/chat_client/chat_add_room.js | 3 ++ .../chat_node/chat_client/chat_create_room.js | 5 +++ .../chat_node/chat_client/chat_update_room.js | 4 -- .../chat_client/event_updaterooms.js | 30 ++++++++++++++ .../chat_client/style/action_board.css | 18 +++++++++ .../chat_node/chat_client/style/chat.css | 11 ++--- .../chat_client/style/msg_thread.css | 2 +- .../chat_node/chat_server/event_adduser.js | 4 +- .../chat_node/chat_server/event_createroom.js | 9 +++++ tests_hugo/chat_node/chat_server/server.js | 16 ++++++-- 12 files changed, 111 insertions(+), 35 deletions(-) create mode 100644 tests_hugo/chat_node/chat_client/chat_add_room.js create mode 100644 tests_hugo/chat_node/chat_client/chat_create_room.js delete mode 100644 tests_hugo/chat_node/chat_client/chat_update_room.js create mode 100644 tests_hugo/chat_node/chat_client/event_updaterooms.js create mode 100644 tests_hugo/chat_node/chat_client/style/action_board.css create mode 100644 tests_hugo/chat_node/chat_server/event_createroom.js diff --git a/README.md b/README.md index 13761e6f..92fd07b9 100644 --- a/README.md +++ b/README.md @@ -110,4 +110,8 @@ - [separation of concern](https://adamwathan.me/css-utility-classes-and-separation-of-concerns/) - [decoupling css and html](https://www.smashingmagazine.com/2012/04/decoupling-html-from-css/) +### security +- [xss attack with innerHTML](https://gomakethings.com/a-safer-alternative-to-innerhtml-with-vanilla-js/) +- [xss attack innerHTML prevention](https://stackoverflow.com/questions/30661497/xss-prevention-and-innerhtml) +- [xss attack prevention with createTextNode](https://stackoverflow.com/questions/11654555/is-createtextnode-completely-safe-from-html-injection-xss) diff --git a/tests_hugo/chat_node/chat_client/chat.html b/tests_hugo/chat_node/chat_client/chat.html index d98b1448..4f4dd59a 100644 --- a/tests_hugo/chat_node/chat_client/chat.html +++ b/tests_hugo/chat_node/chat_client/chat.html @@ -14,38 +14,33 @@
- +