|
|
@ -844,7 +844,7 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz |
|
|
|
{ |
|
|
|
cJSON *tokens,*argjson,*origargjson,*json = 0; long filesize; struct iguana_info *coin = 0; |
|
|
|
char symbol[64],buf[4096],*originstr,urlmethod[16],*data,url[8192],furl[8192],*retstr,*filestr,*token = 0; int32_t i,j,n,num=0; |
|
|
|
//printf("rpcparse.(%s)\n",urlstr);
|
|
|
|
printf("rpcparse.(%s)\n",urlstr); |
|
|
|
if ( myinfo->remoteorigin == 0 ) |
|
|
|
{ |
|
|
|
n = (int32_t)(strlen(urlstr) - strlen("Origin: ")); |
|
|
@ -854,7 +854,7 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz |
|
|
|
originstr = &urlstr[i + strlen("Origin: ")]; |
|
|
|
if ( strncmp(originstr,"http://127.0.0.",strlen("http://127.0.0.")) == 0 ) |
|
|
|
originstr = "http://127.0.0.1:"; |
|
|
|
if ( strncmp("null",originstr,strlen("null")) != 0 && strncmp("http://localhost:",originstr,strlen("http://localhost:")) != 0 && strncmp("http://127.0.0.1:",originstr,strlen("http://127.0.0.1:")) != 0 && strncmp("http://easydex.supernet.org:",originstr,strlen("http://easydex.supernet.org:")) != 0 ) |
|
|
|
if ( strncmp("null",originstr,strlen("null")) != 0 && strncmp("http://localhost:",originstr,strlen("http://localhost:")) != 0 && strncmp("http://127.0.0.1:",originstr,strlen("http://127.0.0.1:")) != 0 && strncmp("http://easydex.supernet.org",originstr,strlen("http://easydex.supernet.org")) != 0 ) |
|
|
|
{ |
|
|
|
printf("remote Origin REJECT.(%s)\n",urlstr); |
|
|
|
return(clonestr("{\"error\":\"remote origin not enabled\"}")); |
|
|
|