Page 1 of 1

FFS!

Posted: 02 Nov 2006, 21:54
by Cabbage
Could the mods please mute/ban/whatever anyone who decides to write the stuff that causes the lobby to crash? someone keeps doing in and its really starting to get annoying now..

[20:32:51] * Northball has left #main (Quit: undefined connection error)
[20:32:51] * [tN]Toonman has left #main (Quit: undefined connection error)
[20:32:51] * hyinennn has left #main (Quit: undefined connection error)
[20:32:51] * Aiwi has left #main (Quit: undefined connection error)
[20:32:51] * DrCain has left #main (Quit: undefined connection error)
[20:32:51] * Gazok has left #main (Quit: undefined connection error)
[20:32:51] * moorhun has left #main (Quit: undefined connection error)
[20:32:51] * KauhuKuula has left #main (Quit: undefined connection error)
[20:32:51] * DavTech has left #main (Quit: undefined connection error)
[20:32:51] * listig has left #main (Quit: undefined connection error)
[20:32:51] * DGun has left #main (Quit: undefined connection error)
[20:32:51] * Frylix has left #main (Quit: undefined connection error)
[20:32:51] * [EE]Decimator has left #main (Quit: undefined connection error)
[20:32:51] * [NR]hydrix has left #main (Quit: undefined connection error)
[20:32:51] * yienyien has left #main (Quit: undefined connection error)
[20:32:51] * [BM]Rudirogdt has left #main (Quit: undefined connection error)
[20:32:51] * TheNaughtily has left #main (Quit: undefined connection error)
[20:32:51] * buddlflink has left #main (Quit: undefined connection error)
[20:32:51] * Gyscos has left #main (Quit: undefined connection error)
[20:32:51] * flyinghuman has left #main (Quit: undefined connection error)
[20:32:51] * hobortos_hobagoly has left #main (Quit: undefined connection error)
[20:32:52] * Crazmez has left #main (Quit: undefined connection error)
[20:32:52] * Blueshift has left #main (Quit: undefined connection error)
[20:32:52] * r0b0 has left #main (Quit: undefined connection error)
[20:32:52] * Iklash222 has left #main (Quit: undefined connection error)
[20:32:52] * Wachner has left #main (Quit: undefined connection error)
[20:32:52] * OMLI has left #main (Quit: undefined connection error)
[20:32:52] * Mitch8Pain has left #main (Quit: undefined connection error)
[20:32:52] * skymyj has left #main (Quit: undefined connection error)
[20:32:52] * [WarC]Kixxe has left #main (Quit: undefined connection error)
[20:32:52] * davidoff has left #main (Quit: undefined connection error)
[20:32:52] * Magnesium has left #main (Quit: undefined connection error)
[20:32:52] * [tN]Biscuit_Mage has left #main (Quit: undefined connection error)
[20:32:52] * Klaifotis has left #main (Quit: undefined connection error)
[20:32:52] * Rinac9 has left #main (Quit: undefined connection error)
[20:32:52] * bluedog has left #main (Quit: undefined connection error)
[20:32:52] * Merica has left #main (Quit: undefined connection error)
[20:32:52] * anticrust has left #main (Quit: undefined connection error)
[20:32:52] * drunk3nm8ster has left #main (Quit: undefined connection error)
[20:32:52] * causette has left #main (Quit: undefined connection error)
[20:32:52] * basholor has left #main (Quit: undefined connection error)
[20:32:52] * jimmysausage has left #main (Quit: undefined connection error)
[20:32:52] * Onix1 has left #main (Quit: undefined connection error)
[20:32:52] * [tN]Acidd_UK has left #main (Quit: undefined connection error)
[20:32:52] * Reaperi has left #main (Quit: undefined connection error)
[20:32:52] * DoctorPlasma has left #main (Quit: undefined connection error)
[20:32:52] * [BDVS]Xahorhum has left #main (Quit: undefined connection error)
[20:32:52] * Someone_else has left #main (Quit: undefined connection error)
[20:32:52] * Stoy has left #main (Quit: undefined connection error)
[20:32:52] * [BDVS]sanex has left #main (Quit: undefined connection error)
[20:32:52] * [LCC]LordMatt[KoAA] has left #main (Quit: undefined connection error)
[20:32:52] * Robshot has left #main (Quit: undefined connection error)
[20:32:52] * jj has left #main (Quit: undefined connection error)
[20:32:52] * champifun has left #main (Quit: undefined connection error)
[20:32:52] * [WarC]DayWalkeR has left #main (Quit: undefined connection error)
[20:32:52] * [tN]Ray has left #main (Quit: undefined connection error)
[20:32:52] * Snowbody has left #main (Quit: undefined connection error)
[20:32:52] * urock has left #main (Quit: undefined connection error)

Posted: 03 Nov 2006, 00:02
by SwiftSpear
There's something that can be written that causes lobby to crash? I don't mind banning someone who's maliciously crashing lobby, but that's really a bug that should be fixed. I don't know anything about the bug so I'm gonna leave it to betalord...

Posted: 03 Nov 2006, 00:46
by Cabbage
Aye, i don't mean deal with the bug thats for betalord ofc. I just mean there have been prats using it today, causing the lobby to crash repeatedly

Posted: 03 Nov 2006, 00:52
by Cabbage
and again..

[23:48:49] * Blueshift has left #main (Quit: undefined connection error)
[23:48:50] * [KnoX]P3374H has left #main (Quit: undefined connection error)
[23:48:50] * Northball has left #main (Quit: undefined connection error)
[23:48:50] * Iklash222 has left #main (Quit: undefined connection error)
[23:48:50] * Saff has left #main (Quit: undefined connection error)
[23:48:50] * Dedalus has left #main (Quit: undefined connection error)
[23:48:50] * jj has left #main (Quit: undefined connection error)
[23:48:50] * DarthVader has left #main (Quit: undefined connection error)
[23:48:50] * [KnoX]Myg has left #main (Quit: undefined connection error)
[23:48:50] * ChanServ has left #main (Quit: undefined connection error)
[23:48:50] * Testy has left #main (Quit: undefined connection error)
[23:48:50] * Napkin has left #main (Quit: undefined connection error)
[23:48:50] * [LCC]NeverToDie has left #main (Quit: undefined connection error)
[23:48:50] * nw_inferno has left #main (Quit: undefined connection error)
[23:48:50] * Gilroy has left #main (Quit: undefined connection error)

Posted: 03 Nov 2006, 01:08
by Snipawolf
Holy crap, that sounds annoying..

Posted: 03 Nov 2006, 02:59
by Magus_X
this is getting annoying, they are doing it all the time

Posted: 03 Nov 2006, 11:59
by SwiftSpear
Cabbage wrote:Aye, i don't mean deal with the bug thats for betalord ofc. I just mean there have been prats using it today, causing the lobby to crash repeatedly
I understand, I'm saying I don't understand the nature of the bug, therefore I'm going to leave deciding what kind of moderation action should be taken and what is the trigger case up to betalord. Not that we should wait until the next spring lobby release when it will be fixed.

Posted: 03 Nov 2006, 15:11
by iamacup
SwiftSpear wrote:
Cabbage wrote:Aye, i don't mean deal with the bug thats for betalord ofc. I just mean there have been prats using it today, causing the lobby to crash repeatedly
I understand, I'm saying I don't understand the nature of the bug, therefore I'm going to leave deciding what kind of moderation action should be taken and what is the trigger case up to betalord. Not that we should wait until the next spring lobby release when it will be fixed.
i wont post the link here but it is in mantis.

edit : mantis report is now hidden from plebs

Posted: 03 Nov 2006, 22:34
by Betalord
People don't neccessarily do that intentionally, it has to do with typing some special characters (like some french ones) which server doesn't translate correctly as it doesn't support utf (it splits them by $A / $D I think, causing a line break making a half of line new command which client recognizes as invalid command, which is critical error for client as it thinks server is malfunctioning).

Will probably take another couple of days to fix, if anyone is into java and java.nio buffers, feel free to check server sources in svn and help me locate the cause :)

Posted: 04 Nov 2006, 02:15
by Kloot
Well, the cause is that the CharsetDecoder's decode() method messes up in an unusual way when the readbuffer contains a pair of bytes that don't represent a character in the ISO-8859-1 set (ie. any char whose decimal value exceeds 0x00FF), even though (with the CodingErrorAction for unmappable characters set to REPLACE) the decoder should just silenty insert question marks into its own output buffer in those cases and be done with it. I changed the CodingErrorAction to REPORT to see if any UnmappableCharacterExceptions would be thrown (by purposely putChar()-ing random 2-byte values like 0xDEAD into a ByteBuffer and passing it to decode()), but no dice there either, just a bunch of wrongly mapped crap in the output. Whatever's causing those LF or CR chars to appear, it isn't an official exception.

Posted: 04 Nov 2006, 18:46
by Dragon45
Why can't the non-standard characters just not be added to the buffer?

if (char < good_char_max && char > good_char_min)
{
this.addToBuffer(char);
}


Also, could it be that a float or negative value is being passed due to some other keyboard style?

Posted: 04 Nov 2006, 19:17
by Drawer
They are standart letters. Also that kinda solution would be stupid "tape fix"

Posted: 04 Nov 2006, 19:42
by jackalope
ban continentals tbh

Posted: 04 Nov 2006, 19:48
by Dragon45
That kinda solution I Mentioned aint a tape fix, its a filter. Maybe if its added in the default client as well as the server, that would be better, so that6 someone maliciously trying to break the server still wouldnt be able to suceed via that method.

Posted: 04 Nov 2006, 23:26
by DemO
isnt this all becuz kixxe posted how on the forums? :)

Posted: 04 Nov 2006, 23:34
by AF
Why can we not switch the protocol to use utf rather than ascii or w/e is used currently? The unicode setup's supported in python/delphi/java is it not? It would require just changing the encoder/decoder in the server, then changing the clientside GUI and data structures appropriately..

And if I understand correctly then why is it that the server cant just filter out the half new line messages? And whats stopping a check client side resulting in discarding the message rather than just assuming the server's broken and disconnecting...

Or why not just filter out messages with utf characters client side?

Have you also tried making sure the JRE on the server machine is upto date with the latest version? It may be that a java bug with this has already been fixed and a distribution is available....

Posted: 04 Nov 2006, 23:59
by Dragon45
We don't want to filter it out client exclusively side because its retarded security. The client side is open sourced as well.

Posted: 05 Nov 2006, 00:36
by rattle
Since the protocol is full text (correct me if I'm wrong) maybe it could use special placeholders like HTML does, if it is too much trouble to put unicode or utf8 support in. On the other hand, the quickest solution would be to strip all special characters from the buffer by restricting it to a-zA-Z0-9 and some special chars (like brackets, +/-*...etc) perhaps.

Posted: 05 Nov 2006, 01:23
by Kloot
Switching to UTF-8 wouldn't really matter since anybody with malicious intent could still force-insert control characters into their text, and adding client-side filtering would be pointless due to being trivial to defeat. The only thing that absolutely *is* required is better input validation on the part of the server by having it strip out illegal characters (basically all non-alphanumeric ones) before processing the buffer further, which on the bright side would take maybe 5 minutes to implement.

Posted: 07 Nov 2006, 23:37
by Betalord
after analyzing the problem a bit more I figured out it was not about splitting lines at all (that was a problem some time ago and I thought this was related), the problem was in TASServer.sendLineToSocketChannel() method not correctly cutting received string into chunks that would fit the writeBuffer, since String.length() returns number of "chars", not bytes (causing BufferOverflowException on too long byte streams that contained some special chars).
Problem should now be solved, sorry for misguiding you though!