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