Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cryptation
#1
I need to know the function that Gs use to crypt and decrypet administrato password....
this should be in the core function of Gs ma i can't find it....

TNX
Reply
#2
We never decrypt the password. This would make for a very insecure system in Open source because anyone could just look into the function and decrypt any passwords they might find.

The function used to hash the password is passhash() and can be found at line 535 of /admin/inc/template_functions.php. It's a very straight-forward sha1 encryption of your password and a random SALT.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#3
OK i see, tnx....

so i encript data whit

$cripted_data=passhas($data);
if ($cripted_data==$stored_value) {}


but if salt is random i have the same value????
Reply
#4
Yes, the SALT is randomly created when you install GetSimple. So it’s not a new random string every time, but it’s a different random string for each website.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#5
Zegnåt Wrote:Yes, the SALT is randomly created when you install GetSimple. So it’s not a new random string every time, but it’s a different random string for each website.

OK i see that's this is correct....

salt value where is saved? becouse if i trasfer datafile in a different website or a new installation i can't certify my old users....
Reply
#6
If I’m not mistaking it’s saved in authorization.xml, in an element called apikey.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#7
Zegnåt Wrote:If I’m not mistaking it’s saved in authorization.xml, in an element called apikey.

yes you don't mistake....

but value is
<apikey><apikey>

that's no value....

i notice in GSconfig.php
that are defined GSLOGINSALT and GSUSECUSTOMSALT (commented)

and that passhash() check if is defined GSUSECUSTOMSALT or use "null" like salt
and return like crypted password sha1($string,null);

so i'm not so sure that every website had a different salt value...
i think is more simply for me define GSUSECUSTOMSALT in GSCONFIG.PHP
Reply




Users browsing this thread: 1 Guest(s)