mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 00:07:47 +00:00
Made custom worker names safe for JSON data
And comma-separated lists too.
This commit is contained in:
parent
ed56206c30
commit
10978c59e4
1 changed files with 2 additions and 2 deletions
|
@ -197,8 +197,8 @@ static bool get_custom_user(const char* s, char (&user)[N])
|
|||
if ((c == '+') || (c == '.')) {
|
||||
break;
|
||||
}
|
||||
// Limit to printable ASCII characters
|
||||
if (c >= ' ' && c <= '~') {
|
||||
// Limit to printable ASCII characters, also skip comma and JSON special characters
|
||||
if (c >= ' ' && c <= '~' && c != ',' && c != '"' && c != '\\') {
|
||||
user[len++] = c;
|
||||
}
|
||||
++s;
|
||||
|
|
Loading…
Reference in a new issue