• 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!

[PHP] Config and Functions !

cremes

New Member
Joined
Oct 12, 2012
Messages
69
Reaction score
2
Witam,

mam problem gdyz mam ustawione w w/w pliku w acc cos takiego .

//return password to db
function password_ency($password)
{
$ency = $GLOBALS['config']['server']['encryptionType'];
if($ency != 'plain')
return hash($ency, $password);
elseif($ency == 'plain')
return $password;
}

wszystko fajnie w bazie tworzyly sie hasla w postaci sha1 tak jak mam ustawione w config.lua w ots.
tylko pomyslalem zeby zmienic sobie z plain na sha1.
co mnie zdziwilo to to ze nie moglem sie zalogowac na swoje konto admina, zobaczylem w bazie mysql. wszystko bylo ok.
zrobilem nowe konto, i obczailem baze, zamiast kodowania sha1 bylo plain...

ktos moze to wyjasnic ?

aktualnie kod wyglada tak

//return password to db
function password_ency($password)
{
$ency = $GLOBALS['config']['server']['encryptionType'];
if($ency != 'sha1')
return hash($ency, $password);
elseif($ency == 'sha1')
return $password;
}
 
Back
Top