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

Example:

https://www.youtube.com/watch?v=RJ6F17EFqYc

You can fix it simple by checking the inputtext before using it with this stock :

pawn Code:
stock CheckDialogBug(message[])
{
    new message_length = strlen(message);
    for(new i; i < message_length; i++)
    {
        if(message[i] == '%')
        {
            return 1;
        }
    }
    return 0;
}
Now you're gonna use this checking in all DIALOG_STYLE_INPUT dialogs.

Example of usage:

Code:
if(CheckDialogBug(inputtext)) return SendClientMessage(playerid, 0, "{FFFFFF}You can't use '%' in strings.");
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)