mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 02:46:58 +00:00
don't allow null characters in authorized_keys
This commit is contained in:
parent
ed4c38ba46
commit
27828c742c
@ -201,7 +201,12 @@ static int checkpubkey_line(buffer* line, int line_num, const char* filename,
|
||||
|
||||
if (line->len < MIN_AUTHKEYS_LINE || line->len > MAX_AUTHKEYS_LINE) {
|
||||
TRACE(("checkpubkey_line: bad line length %d", line->len))
|
||||
return DROPBEAR_FAILURE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (memchr(line->data, 0x0, line->len) != NULL) {
|
||||
TRACE(("checkpubkey_line: bad line has null char"))
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* compare the algorithm. +3 so we have enough bytes to read a space and some base64 characters too. */
|
||||
|
Loading…
Reference in New Issue
Block a user