]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: skip more whitespace, fixes find-principals on
authordjm@openbsd.org <djm@openbsd.org>
Fri, 8 Mar 2024 22:16:32 +0000 (22:16 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 8 Mar 2024 22:17:22 +0000 (09:17 +1100)
allowed_signers files with blank lines; reported by Wiktor Kwapisiewicz

OpenBSD-Commit-ID: b3a22a2afd753d70766f34bc7f309c03706b5298

sshsig.c

index d50d65fe203cb7b2d471226f13c8f790f01692c7..470b286a3a982875a48a5262b7057c4710b17fed 100644 (file)
--- a/sshsig.c
+++ b/sshsig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshsig.c,v 1.34 2023/12/08 09:18:39 markus Exp $ */
+/* $OpenBSD: sshsig.c,v 1.35 2024/03/08 22:16:32 djm Exp $ */
 /*
  * Copyright (c) 2019 Google LLC
  *
@@ -746,7 +746,7 @@ parse_principals_key_and_options(const char *path, u_long linenum, char *line,
                *keyp = NULL;
 
        cp = line;
-       cp = cp + strspn(cp, " \t"); /* skip leading whitespace */
+       cp = cp + strspn(cp, " \t\n\r"); /* skip leading whitespace */
        if (*cp == '#' || *cp == '\0')
                return SSH_ERR_KEY_NOT_FOUND; /* blank or all-comment line */