summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2024-03-08 22:16:32 +0000
committerDamien Miller <djm@mindrot.org>2024-03-09 09:17:22 +1100
commitcd82f7526e0481720567ae41db7849ab1c27e27b (patch)
treef58b5e1f435fc4a6f4fa0556e4de095c7ac69c16
parent2f9d2af5cb19905d87f37d1e11c9f035ac5daf3b (diff)
upstream: skip more whitespace, fixes find-principals on
allowed_signers files with blank lines; reported by Wiktor Kwapisiewicz OpenBSD-Commit-ID: b3a22a2afd753d70766f34bc7f309c03706b5298
-rw-r--r--sshsig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshsig.c b/sshsig.c
index d50d65fe..470b286a 100644
--- 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 */