Here is a small chatroom I coded with the Python Language. The method is very simple compared to other chatrooms so feel free to take reference from the code!
You can do /read to read without having to press enter
Link is here:
PS: Pls upvote!
A journey of a thousand lines begin with a single line
- Fixed Bug where people can become mod easily by entering [MOD] in their name
Hello, I saw your program and think it is cool. I just want to say a word about your security.
1) I understand you enforce attempts to be mod through your email password, but THIS IS NOT SECURE. If you fork the repl and delete the code that checks this, you can still be mod.
2) You are exposing your jsonstore endpoint in your code! This means anyone can access the database and do whatever they want to it.
The way you can fix this is by making a separate repl that serves as a server and one repl that is a client. On the server, you can create a special file called
.env which no one else can see. A guide on how to do this is here
On the server you can perform all of the database operations and checks for mod, so that no one can just edit the code to take it out. I hope this helps!