jl777 8 years ago
parent
commit
f3dcb55f79
  1. 2
      iguana/iguana_notary.c
  2. 6
      iguana/iguana_rpc.c

2
iguana/iguana_notary.c

@ -13,7 +13,7 @@
* *
******************************************************************************/
// bugs: construct finaltx
// bugs: construct finaltx, src vs dest messages, rotating myind position
// Todo list:
// a) updating latest notarized height based on the notarized tx data

6
iguana/iguana_rpc.c

@ -650,7 +650,7 @@ int32_t is_bitcoinrpc(struct supernet_info *myinfo,char *method,char *remoteaddr
{
if ( strcmp(RPCcalls[i].name,method) == 0 )
{
if ( remoteaddr == 0 || remoteaddr[0] == 0 || strcmp(remoteaddr,"127.0.0.1") == 0 )
if ( remoteaddr == 0 || remoteaddr[0] == 0 || strncmp(remoteaddr,"127.0.0.",strlen("127.0.0.")) == 0 )
return(1);
if ( RPCcalls[i].remoteflag != 0 && myinfo->publicRPC != 0 )
return(i);
@ -850,6 +850,8 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
if ( strncmp("Origin: ",&urlstr[i],strlen("Origin: ")) == 0 )
{
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 )
{
printf("remote Origin REJECT.(%s)\n",urlstr);
@ -1135,6 +1137,8 @@ void iguana_rpcloop(void *args)
}
memcpy(&ipbits,&cli_addr.sin_addr.s_addr,sizeof(ipbits));
expand_ipbits(remoteaddr,ipbits);
if ( strncmp(remoteaddr,"127.0.0.",strlen("127.0.0.")) == 0 )
strcpy(remoteaddr,"127.0.0.1");
memset(jsonbuf,0,IGUANA_MAXPACKETSIZE);
remains = (int32_t)(IGUANA_MAXPACKETSIZE - 1);
buf = jsonbuf;

Loading…
Cancel
Save