mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
stratum: check json version string ptr validity
This commit is contained in:
parent
f3d9f253b3
commit
2b932a8a96
1 changed files with 2 additions and 2 deletions
|
@ -45,8 +45,8 @@ bool client_subscribe(YAAMP_CLIENT *client, json_value *json_params)
|
|||
|
||||
if(json_params->u.array.length>0)
|
||||
{
|
||||
strncpy(client->version, json_params->u.array.values[0]->u.string.ptr, 1023);
|
||||
// if(!strcmp(client->version, "stratum-proxy/0.0.1")) return false;
|
||||
if (json_params->u.array.values[0]->u.string.ptr)
|
||||
strncpy(client->version, json_params->u.array.values[0]->u.string.ptr, 1023);
|
||||
|
||||
if(strstr(client->version, "NiceHash") || strstr(client->version, "proxy") || strstr(client->version, "/3."))
|
||||
client->reconnectable = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue