• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Problem with Salt

felipemko

New Member
Joined
Mar 2, 2010
Messages
173
Reaction score
3
Which distro should I use that contains how to create account by account manager without creating salt?
Or how to fix my account manager does not create salt.
I need to let account manager + website, but my account manager creates salt so the player who creates the account that he can not log into the site.
 
This rev Gesior2012 dont create salt in the accounts.
https://github.com/gesior/Gesior2012/tree/TFS-0.3.6_and_0.4_to_rev_3703

Sources: iologindata.cpp

Goto:
PHP:
uint64_t IOLoginData::createAccount(std::string name, std::string password)

Search
PHP:
password = salt + password;

Replace with:
PHP:
password = password;

Under:
PHP:
query << "INSERT INTO `accounts` (`id`, `name`, `password`, `salt`) VALUES (NULL, " << db->escapeString(name) << ", " << db->escapeString(password) << ", " << db->escapeString(salt) << ")";

Replace with:
PHP:
query << "INSERT INTO `accounts` (`id`, `name`, `password`) VALUES (NULL, " << db->escapeString(name) << ", " << db->escapeString(password) << ")";


Goto:
PHP:
bool IOLoginData::setPassword(uint32_t accountId, std::string newPassword)

Search:
PHP:
newPassword = salt + newPassword;

Replace with:
PHP:
newPassword = newPassword;

Under:
PHP:
query << "UPDATE `accounts` SET `password` = " << db->escapeString(newPassword) << ", `salt` = "<< db->escapeString(salt) << " WHERE `id` = " << accountId << db->getUpdateLimiter();

Replace with:
PHP:
query << "UPDATE `accounts` SET `password` = " << db->escapeString(newPassword) << " WHERE `id` = " << accountId << db->getUpdateLimiter();
 
Back
Top