From cf51e5c14ab802847b225ae9beb86c879c5c7e4d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 1 Aug 2014 09:53:51 +1000 Subject: [PATCH] Don't parse shares from now unauthorised clients --- src/stratifier.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index 638726bb..bc91298e 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2079,6 +2079,10 @@ static void sshare_process(ckpool_t __maybe_unused *ckp, json_params_t *jp) LOGINFO("Share processor failed to find client id %d in hashtable!", client_id); goto out; } + if (unlikely(!client->authorised)) { + LOGDEBUG("Client %d no longer authorised to submit shares", client_id); + goto out; + } json_msg = json_object(); result_val = parse_submit(client, json_msg, jp->params, &err_val); json_object_set_new_nocheck(json_msg, "result", result_val);