Browse Source

Allow sha256(passphrase) to be used as userpass

patch-3
jl777 7 years ago
parent
commit
3610971d0b
  1. 3
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/mm.c

3
iguana/exchanges/LP_commands.c

@ -199,7 +199,8 @@ jpg(srcfile, destfile, power2=7, password, data="", required, ind=0)\n\
authenticated = 1;
else printf("passhash %s != G %s\n",bits256_str(str,passhash),bits256_str(str2,G.LP_passhash));
}
if ( authenticated == 0 && ((userpass= jstr(argjson,"userpass")) == 0 || strcmp(userpass,G.USERPASS) != 0) )
char passhashstr[65]; bits256_str(passhashstr,G.LP_passhash);
if ( authenticated == 0 && ((userpass= jstr(argjson,"userpass")) == 0 || (strcmp(userpass,G.USERPASS) != 0 && strcmp(userpass,passhashstr) != 0)) )
return(clonestr("{\"error\":\"authentication error you need to make sure userpass is set\"}"));
if ( jobj(argjson,"userpass") != 0 )
jdelete(argjson,"userpass");

2
iguana/exchanges/mm.c

@ -156,7 +156,7 @@ int32_t ensure_writable(char *dirname)
int main(int argc, const char * argv[])
{
char dirname[512],*passphrase; double incr; cJSON *retjson;
char dirname[512]; double incr; cJSON *retjson;
OS_init();
if ( strstr(argv[0],"btc2kmd") != 0 && argv[1] != 0 )
{

Loading…
Cancel
Save