From 5c105cbaafc8971fe31755ce1245c3a20f6cd85c Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sat, 8 Jun 2019 23:10:54 -0400 Subject: conditional is more clear now --- auth2-pubkey.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 1f0436ebd..8580412d8 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -565,9 +565,9 @@ check_authkey_line_for_wildcard(struct sshkey *key, char *cp, const char *loc, s if (advance_past_options(&cp) != 0) return -1; skip_space(&cp); - if (!(*cp == '*' && (cp[1] == ' ' || cp[1] == '\n' || cp[1] == '\t' || cp[1] == '\0'))) { - return -1; // This is not a wildcard auth line. - } + // A wildcard auth line must start "* " or "*\t" + if (cp[0] != '*') return -1; + if (cp[1] != ' ' && cp[1] != '\t') return -1; if ((keyopts = sshauthopt_parse(key_options, &reason)) == NULL) { debug("%s: bad key options: %s", loc, reason); -- cgit v1.2.3