[Tutorial] Protection against '%' dialog vulnerability!
#3

Metharon is right, it's a bug. (with entering a %s and using it on format, it will fuck the server)
There's a filter on message with OnPlayerText and OnPlayerCommandText, it removes % on input and also colors on input too!
But you can use the filter which is using on OnPlayerText and OnPlayerCommandText:
Code:
for(new i = 0, j = strlen(input); i < j; i++)
{
	if(input[i] == '%') input[i] = '#';
}
Also you must write a code to filter color embedding like {FFFFFF} (isn't a vulnerability but player mustn't be able to use embedded colors IMO)
Easy to write, I'll post it here soon.
Reply


Messages In This Thread
Protection against '%' dialog vulnerability! - by Metharon - 05.06.2016, 23:53
Re: Protection against '%' dialog vulnerability! - by BlackBank - 06.06.2016, 00:07
Re: Protection against '%' dialog vulnerability! - by Aliassassin123456 - 06.06.2016, 00:17
Re: Protection against '%' dialog vulnerability! - by Aliassassin123456 - 06.06.2016, 16:21

Forum Jump:


Users browsing this thread: 1 Guest(s)