roxlukas / lmeve

LMeve - industry manager and contribution tracker for EVE Online
https://pozniak.pl/wp/
Other
52 stars 13 forks source link

left area overflow is dangerous #68

Closed dstevens79 closed 5 years ago

dstevens79 commented 5 years ago

overflowing the amount of text space in sql cell for entries to the left bar can destroy the entire site.

sql will truncate overflow and there will be no closing braces

if this happens you cannot even edit the contents to repair the pages (i had to find the sql db loc for the string and remove all of it)

extending this to a (dynamically sized(?)) RIDICULOUSLY LONG string so that no one could ever overflow it again might resolve it,

or char limit checks when saving and a warning that they are #### over saving size and doesnt save... but really i was only able to add like 3 buttons and a teamspeak banner....

roxlukas commented 5 years ago

OR instead of truncating and saving - throw error message and disallow saving :-)

roxlukas commented 5 years ago

The database column is actually a dynamically sized string - datetype TEXT - so should hold up to 64kbytes. Form is what might be truncating it - will check.

roxlukas commented 5 years ago

I've added a fix - please let me know if it's better now. It should hold up to 8k of html and will give a warning if you paste more text

dstevens79 commented 5 years ago

this needs to b reopened

website title this was placed in an instance of lmeve by itself and it wrecked the instance... i think the right answer is a script that resets it maybe connected to a button... i also think if we can align it to the right that it will stop breaking the whole site when it gets broken