Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Fix SQL Inject net.SendAnswerMakeGuildPacket


Recommended Posts

  • Administrator

This code makes corrections in the way guild names are processed before being stored in the database. Here are the changes it introduces:

Original Code: The initial portion of the code checked if the guild name met specific requirements using the check_name(gcp.name) function. If the name didn't meet the requirements, a message was sent to the guild master, and the guild creation process was halted.

Added Code: In the added code segment, the DBManager::instance().EscapeString() function is utilized. This function secures the guild name against SQL Injection attacks. The name is processed through this function and then compared with the original name (__guild_name). If the processed name differs from the original, it indicates that it contained special characters that were properly secured before being stored in the database. In such a case, the function returns 0, meaning the guild creation process is aborted.

These changes aim to prevent SQL Injection attacks that could occur if the guild name contained special characters not correctly secured before being stored in the database. Without proper protection, an attacker could inject malicious SQL code that would execute during an attempt to write to the database, posing a significant security threat to the application. Properly escaping the guild name before storing it in the database helps minimize this risk.

 

game -> guild_manager.cpp

Find:

This is the hidden content, please

Add under:

This is the hidden content, please

 

:TravelampPlaces_party-smiley-048:

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...