View | Details | Raw Unified | Return to bug 230568
Collapse All | Expand All

(-)www/lynx/Makefile (-3 / +1 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	lynx
4
PORTNAME=	lynx
5
PORTVERSION=	2.8.8.2
5
PORTVERSION=	2.8.9.1
6
PORTREVISION=	6
7
PORTEPOCH=	1
6
PORTEPOCH=	1
8
CATEGORIES=	www ipv6
7
CATEGORIES=	www ipv6
9
MASTER_SITES=	http://invisible-mirror.net/archives/lynx/tarballs/ \
8
MASTER_SITES=	http://invisible-mirror.net/archives/lynx/tarballs/ \
Lines 21-27 Link Here
21
20
22
USES=		cpe ncurses shebangfix tar:bzip2
21
USES=		cpe ncurses shebangfix tar:bzip2
23
SHEBANG_FILES=	samples/mailto-form.pl
22
SHEBANG_FILES=	samples/mailto-form.pl
24
WRKSRC=		${WRKDIR}/${PORTNAME}2-8-8
25
GNU_CONFIGURE=	yes
23
GNU_CONFIGURE=	yes
26
CONFIGURE_ARGS+=--with-zlib --libdir="${PREFIX}/etc" \
24
CONFIGURE_ARGS+=--with-zlib --libdir="${PREFIX}/etc" \
27
		--enable-nsl-fork --enable-persistent-cookies \
25
		--enable-nsl-fork --enable-persistent-cookies \
(-)www/lynx/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (lynx2.8.8rel.2.tar.bz2) = 6980e75cf0d677fd52c116e2e0dfd3884e360970c88c8356a114338500d5bee7
1
TIMESTAMP = 1534076790
2
SIZE (lynx2.8.8rel.2.tar.bz2) = 2587120
2
SHA256 (lynx2.8.9rel.1.tar.bz2) = 387f193d7792f9cfada14c60b0e5c0bff18f227d9257a39483e14fa1aaf79595
3
SIZE (lynx2.8.9rel.1.tar.bz2) = 2689171
(-)www/lynx/files/patch-CVE-2014-3566 (-12 / +12 lines)
Lines 1-16 Link Here
1
Disable SSLv2 and SSLv3 in lynx to "mitigate POODLE vulnerability".
1
--- WWW/Library/Implementation/HTTP.c.orig	2018-08-12 12:33:30 UTC
2
2
+++ WWW/Library/Implementation/HTTP.c
3
This change has been passed upstream.
3
@@ -206,11 +206,8 @@ SSL *HTGetSSLHandle(void)
4
5
--- WWW/Library/Implementation/HTTP.c.orig	2015-02-16 12:48:34.014809453 -0800
6
+++ WWW/Library/Implementation/HTTP.c	2015-02-16 12:49:09.627395954 -0800
7
@@ -119,7 +119,8 @@
8
 #else
4
 #else
9
 	SSLeay_add_ssl_algorithms();
5
 	SSLeay_add_ssl_algorithms();
10
 	ssl_ctx = SSL_CTX_new(SSLv23_client_method());
6
 	if ((ssl_ctx = SSL_CTX_new(TLS_client_method())) != NULL) {
11
-	SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
7
-#ifdef SSL_OP_NO_SSLv2
12
+	/* Always disable SSLv2 & SSLv3 to "mitigate POODLE vulnerability". */
8
-	    SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2);
13
+	SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
9
-#else
10
-	    SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL);
11
-#endif
12
+		/* Always disable SSLv2 & SSLv3 to "mitigate POODLE vulnerability". */
13
+	    SSL_CTX_set_options(ssl_ctx, SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
14
 #ifdef SSL_OP_NO_COMPRESSION
14
 #ifdef SSL_OP_NO_COMPRESSION
15
 	SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_COMPRESSION);
15
 	    SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_COMPRESSION);
16
 #endif
16
 #endif
(-)www/lynx/files/patch-CVE-2016-9179 (-85 lines)
Lines 1-85 Link Here
1
Fix for CVE-2016-9179
2
See:
3
http://lists.nongnu.org/archive/html/lynx-dev/2016-11/msg00018.html
4
5
Re-engineered the upstream patch, which was only released
6
for the unstable lynx2.8.9. Removed the at_sign, and made sure that
7
the user id is correctly stripped of all non valid inputs.
8
9
--- WWW/Library/Implementation/HTTCP.c_orig	2016-12-01 15:07:39.487753520 +0000
10
+++ WWW/Library/Implementation/HTTCP.c	2016-12-01 15:10:20.291328282 +0000
11
@@ -1792,7 +1792,6 @@
12
     int status = 0;
13
     char *line = NULL;
14
     char *p1 = NULL;
15
-    char *at_sign = NULL;
16
     char *host = NULL;
17
 
18
 #ifdef INET6
19
@@ -1814,14 +1813,8 @@
20
      * Get node name and optional port number.
21
      */
22
     p1 = HTParse(url, "", PARSE_HOST);
23
-    if ((at_sign = StrChr(p1, '@')) != NULL) {
24
-	/*
25
-	 * If there's an @ then use the stuff after it as a hostname.
26
-	 */
27
-	StrAllocCopy(host, (at_sign + 1));
28
-    } else {
29
 	StrAllocCopy(host, p1);
30
-    }
31
+    strip_userid(host, FALSE);
32
     FREE(p1);
33
 
34
     HTSprintf0(&line, "%s%s", WWW_FIND_MESSAGE, host);
35
--- WWW/Library/Implementation/HTTP.c_orig	2016-12-01 15:13:24.171404704 +0000
36
+++ WWW/Library/Implementation/HTTP.c	2016-12-01 15:19:59.699276204 +0000
37
@@ -426,7 +426,7 @@
38
 /*
39
  * Strip any username from the given string so we retain only the host.
40
  */
41
-static void strip_userid(char *host)
42
+void strip_userid(char *host, int parse_only)
43
 {
44
     char *p1 = host;
45
     char *p2 = StrChr(host, '@');
46
@@ -439,7 +439,8 @@
47
 
48
 	    CTRACE((tfp, "parsed:%s\n", fake));
49
 	    HTSprintf0(&msg, gettext("Address contains a username: %s"), host);
50
-	    HTAlert(msg);
51
+           if (msg !=0 && !parse_only)
52
+	        HTAlert(msg);
53
 	    FREE(msg);
54
 	}
55
 	while ((*p1++ = *p2++) != '\0') {
56
@@ -1081,7 +1082,7 @@
57
 	char *host = NULL;
58
 
59
 	if ((host = HTParse(anAnchor->address, "", PARSE_HOST)) != NULL) {
60
-	    strip_userid(host);
61
+	    strip_userid(host, TRUE);
62
 	    HTBprintf(&command, "Host: %s%c%c", host, CR, LF);
63
 	    FREE(host);
64
 	}
65
--- WWW/Library/Implementation/HTUtils.h_orig	2016-12-01 15:21:38.919699987 +0000
66
+++ WWW/Library/Implementation/HTUtils.h	2016-12-01 15:22:57.870511104 +0000
67
@@ -801,6 +801,8 @@
68
 
69
     extern FILE *TraceFP(void);
70
 
71
+    extern void strip_userid(char *host, int warn);
72
+
73
 #ifdef USE_SSL
74
     extern SSL *HTGetSSLHandle(void);
75
     extern void HTSSLInitPRNG(void);
76
--- src/LYUtils.c_orig	2016-12-01 15:25:21.769447171 +0000
77
+++ src/LYUtils.c	2016-12-01 15:28:31.901411555 +0000
78
@@ -4693,6 +4693,7 @@
79
      * Do a DNS test on the potential host field as presently trimmed.  - FM
80
      */
81
     StrAllocCopy(host, Str);
82
+    strip_userid(host, FALSE);
83
     HTUnEscape(host);
84
     if (LYCursesON) {
85
 	StrAllocCopy(MsgStr, WWW_FIND_MESSAGE);
(-)www/lynx/files/patch-WWW_Library_Implementation_HTTP.c (-11 lines)
Lines 1-11 Link Here
1
--- WWW/Library/Implementation/HTTP.c.orig	2017-02-09 21:20:27 UTC
2
+++ WWW/Library/Implementation/HTTP.c
3
@@ -721,7 +722,7 @@ static int HTLoadHTTP(const char *arg,
4
 #elif SSLEAY_VERSION_NUMBER >= 0x0900
5
 #ifndef USE_NSS_COMPAT_INCL
6
 	if (!try_tls) {
7
-	    handle->options |= SSL_OP_NO_TLSv1;
8
+	    SSL_set_options(handle, SSL_OP_NO_TLSv1);
9
 #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
10
 	} else {
11
 	    int ret = (int) SSL_set_tlsext_host_name(handle, ssl_host);

Return to bug 230568