|
|
@ -5266,14 +5266,8 @@ static void parse_method(ckpool_t *ckp, sdata_t *sdata, stratum_instance_t *clie |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* We should only accept subscribed requests from here on */ |
|
|
|
/* We shouldn't really allow unsubscribed users to authorise first but
|
|
|
|
if (!client->subscribed) { |
|
|
|
* some broken stratum implementations do that and we can handle it. */ |
|
|
|
LOGINFO("Dropping unsubscribed client %"PRId64" %s requesting method %s", |
|
|
|
|
|
|
|
client_id, client->address, method); |
|
|
|
|
|
|
|
connector_drop_client(ckp, client_id); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (cmdmatch(method, "mining.auth")) { |
|
|
|
if (cmdmatch(method, "mining.auth")) { |
|
|
|
json_params_t *jp; |
|
|
|
json_params_t *jp; |
|
|
|
|
|
|
|
|
|
|
@ -5287,6 +5281,15 @@ static void parse_method(ckpool_t *ckp, sdata_t *sdata, stratum_instance_t *clie |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* We should only accept requests from subscribed and authed users here
|
|
|
|
|
|
|
|
* on */ |
|
|
|
|
|
|
|
if (!client->subscribed) { |
|
|
|
|
|
|
|
LOGINFO("Dropping %s from unsubscribed client %"PRId64" %s", method, |
|
|
|
|
|
|
|
client_id, client->address); |
|
|
|
|
|
|
|
connector_drop_client(ckp, client_id); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* We should only accept authorised requests from here on */ |
|
|
|
/* We should only accept authorised requests from here on */ |
|
|
|
if (!client->authorised) { |
|
|
|
if (!client->authorised) { |
|
|
|
LOGINFO("Dropping %s from unauthorised client %"PRId64" %s", method, |
|
|
|
LOGINFO("Dropping %s from unauthorised client %"PRId64" %s", method, |
|
|
|