From 9bfb6ca077fd499ea587683abc27e9b3bd0cc44e 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 0e39f6abd..a3cee1776 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -575,9 +575,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