Willard21 / MineKhan

Minecraft for Khan Academy
81 stars 52 forks source link

So I made a text "bomb" (Please find a way to prevent this from being possible (i.e. a 690 character cap per message).) #79

Closed ImaginaryNeon closed 1 year ago

ImaginaryNeon commented 2 years ago

I accidentally found this, tested it a bit, realized it was too destructive, and posted this.

image

I'm not putting the text here cuz then It would prob take an hour to open this. (That and to prevent other people doing this.)

Mist-Stego commented 2 years ago

Willard can find a way to constrain the amount of characters sent in a message to about, say 50? It would fix this bug almost immediately :P

ImaginaryNeon commented 2 years ago

Well, I feel like 50 would be too little. We still want people to be able to say several sentences in a chat. I feel like 500 is better since that's the normal max characters for posting on many sites. (maybe 591 cuz haha pokemon #591 go brrrr)

Mist-Stego commented 2 years ago

Hmmm, you are right.

I am a little curious about one particular thing however, how many characters would it take to crash the MineKhan website? If Willard's computer is the server, then it probably either would be dependent on...

1) The capacity and capabilities that Willard's PC / Laptop has. 2) (maybe?) The storage quota that Willard's browser recommends and abides by on all windows 3) The capacity of Willard's RAM 4) The capacity of JS and it's localStorage Quota.

EDIT: I feel like we should set the max amount of characters to around 150 due to the fact that no one is going to type any more than 50 words in a video game 🤔

ImaginaryNeon commented 2 years ago

Btw, it moreso lagged when entering/(maybe iirc)exiting chat than just causing lag period.

ImaginaryNeon commented 2 years ago

Also, you'd be suprised to see how many words people put into normal chat messages

Willard21 commented 1 year ago

I capped it at I think 512 characters now.