Browse Source

Test

etomic
jl777 8 years ago
parent
commit
59f04f5404
  1. 4
      iguana/exchanges/LP_commands.c

4
iguana/exchanges/LP_commands.c

@ -503,8 +503,6 @@ char *stats_JSON(cJSON *argjson,char *remoteaddr,uint16_t port) // from rpc port
return(clonestr("{\"error\":\"need method in request\"}")); return(clonestr("{\"error\":\"need method in request\"}"));
if ( USERPASS[0] != 0 && strcmp(remoteaddr,"127.0.0.1") == 0 && port != 0 ) if ( USERPASS[0] != 0 && strcmp(remoteaddr,"127.0.0.1") == 0 && port != 0 )
{ {
if ( (userpass= jstr(argjson,"userpass")) == 0 || strcmp(userpass,USERPASS) != 0 )
return(clonestr("{\"error\":\"authentication error\"}"));
if ( USERPASS_COUNTER == 0 ) if ( USERPASS_COUNTER == 0 )
{ {
USERPASS_COUNTER = 1; USERPASS_COUNTER = 1;
@ -512,6 +510,8 @@ char *stats_JSON(cJSON *argjson,char *remoteaddr,uint16_t port) // from rpc port
jaddstr(retjson,"userpass",USERPASS); jaddstr(retjson,"userpass",USERPASS);
return(jprint(retjson,1)); return(jprint(retjson,1));
} }
if ( (userpass= jstr(argjson,"userpass")) == 0 || strcmp(userpass,USERPASS) != 0 )
return(clonestr("{\"error\":\"authentication error\"}"));
if ( (base= jstr(argjson,"base")) != 0 && (rel= jstr(argjson,"rel")) != 0 ) if ( (base= jstr(argjson,"base")) != 0 && (rel= jstr(argjson,"rel")) != 0 )
{ {
if ( strcmp(method,"setprice") == 0 ) if ( strcmp(method,"setprice") == 0 )

Loading…
Cancel
Save