]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: relax checking of authorized_keys environment="..." V_7_7 anongit/V_7_7 github-selfhosted/V_7_7 github/V_7_7
authordjm@openbsd.org <djm@openbsd.org>
Fri, 6 Apr 2018 04:15:45 +0000 (04:15 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Wed, 6 Jun 2018 06:20:19 +0000 (16:20 +1000)
options to allow underscores in variable names (regression introduced in
7.7). bz2851, ok deraadt@

OpenBSD-Commit-ID: 69690ffe0c97ff393f2c76d25b4b3d2ed4e4ac9c

auth-options.c

index b528c197ab26b2bdf1c51e22193c08eb20b4571a..ef57ebf43a215bef56a5a727ff13ad2a028d83bf 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth-options.c,v 1.78 2018/03/14 05:35:40 djm Exp $ */
+/* $OpenBSD: auth-options.c,v 1.79 2018/04/06 04:15:45 djm Exp $ */
 /*
  * Copyright (c) 2018 Damien Miller <djm@mindrot.org>
  *
@@ -394,7 +394,7 @@ sshauthopt_parse(const char *opts, const char **errstrp)
                                goto fail;
                        }
                        for (cp = opt; cp < tmp; cp++) {
-                               if (!isalnum((u_char)*cp)) {
+                               if (!isalnum((u_char)*cp) && *cp != '_') {
                                        free(opt);
                                        errstr = "invalid environment string";
                                        goto fail;