freebsd-ports/www/shellinabox/files/patch-shellinabox_launcher.c
Olivier Cochard a2465c456e Fixes:
- build with OpenSSL 1.1
- broken multipart/form-data (CVE-2018-16789)
- Interpret aixterm high-intensity color escape codes
All these patches came from the project pull requests list.

Reported by:	pkg-fallout
Security:	CVE-2018-16789
2018-11-10 22:45:31 +00:00

13 lines
502 B
C

--- shellinabox/launcher.c.orig 2016-11-09 19:40:33 UTC
+++ shellinabox/launcher.c
@@ -993,8 +993,8 @@ static pam_handle_t *internalLogin(struct Service *ser
if (service->authUser == 2 /* SSH */) {
// If connecting to a remote host, include that hostname
hostname = strrchr(service->cmdline, '@');
- if (!hostname || !strcmp(++hostname, "localhost")) {
- hostname = NULL;
+ if (hostname) {
+ hostname++;
}
}
struct utsname uts;