diff options
author | djm@openbsd.org <djm@openbsd.org> | 2024-09-06 04:30:44 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2024-09-06 04:31:19 +0200 |
commit | a8ad7a2952111c6ce32949a775df94286550af6b (patch) | |
tree | 21faa3d72559a7a5121b8287a2f8dab31bec5a68 /ssh-add.c | |
parent | upstream: be more strict in parsing key type names. Only allow (diff) | |
download | openssh-a8ad7a2952111c6ce32949a775df94286550af6b.tar.xz openssh-a8ad7a2952111c6ce32949a775df94286550af6b.zip |
upstream: make parsing user@host consistently look for the last '@' in
the string rather than the first. This makes it possible to use usernames
that contain '@' characters.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Prompted by Max Zettlmeißl; feedback/ok millert@
OpenBSD-Commit-ID: 0b16eec246cda15469ebdcf3b1e2479810e394c5
Diffstat (limited to '')
-rw-r--r-- | ssh-add.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.172 2024/01/11 01:45:36 djm Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.173 2024/09/06 02:30:44 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -698,7 +698,7 @@ parse_dest_constraint_hop(const char *s, struct dest_constraint_hop *dch, memset(dch, '\0', sizeof(*dch)); os = xstrdup(s); - if ((host = strchr(os, '@')) == NULL) + if ((host = strrchr(os, '@')) == NULL) host = os; else { *host++ = '\0'; |