links

lynx-like text mode web browser
git clone anongit@rnpnr.xyz:links.git
Log | Files | Refs | Feed | README | LICENSE

Commit: bf6ec37c41823d5da95a4c423116cf1107e94849
Parent: 418216446f6df69bd04e5184085b127f905d00a5
Author: opask
Date:   Tue, 28 Aug 2018 22:44:39 -0600

default.c: remove allow_hyperlinks_to_smb option

Diffstat:
Mdefault.c | 7-------
Mlinks.1 | 6------
Mlinks.h | 6------
Msched.c | 3+--
4 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/default.c b/default.c @@ -1214,11 +1214,6 @@ fprintf(stdout, "%s%s%s%s%s%s\n", " -ftp.set-iptos <0>/<1>\n" " Set IP Type-of-service to high throughput on ftp connections.\n" "\n" -" -smb.allow-hyperlinks-to-smb <0>/<1>\n" -" Allow hyperlinks to SMB protocol.\n" -" Disabling this improves security, because internet sites cannot\n" -" exploit possible bugs in the SMB client.\n" -"\n" " -menu-font-size <size>\n" " Size of font in menu.\n" "\n" @@ -1452,7 +1447,6 @@ struct ssl_options ssl_options = { SSL_WARN_ON_INVALID_CERTIFICATE, "", "", "" }; struct http_options http_options = { 0, 1, 1, 0, 0, 0, 0, { 0, "", "" } }; struct ftp_options ftp_options = { "somebody@host.domain", 0, 0, 0, 1 }; -struct smb_options smb_options = { 0 }; unsigned char download_dir[MAX_STR_LEN] = ""; @@ -1576,7 +1570,6 @@ static struct option links_options[] = { {1, gen_cmd, num_rd, num_wr, 0, 1, &ftp_options.eprt_epsv, "ftp.use_eprt_epsv", "ftp.use-eprt-epsv"}, {1, gen_cmd, num_rd, num_wr, 0, 1, &ftp_options.fast_ftp, "ftp.fast", "ftp.fast"}, {1, gen_cmd, num_rd, num_wr, 0, 1, &ftp_options.set_tos, "ftp.set_iptos", "ftp.set-iptos"}, - {1, gen_cmd, num_rd, num_wr, 0, 1, &smb_options.allow_hyperlinks_to_smb, "smb.allow_hyperlinks_to_smb", "smb.allow-hyperlinks-to-smb"}, {1, gen_cmd, num_rd, num_wr, 1, MAX_FONT_SIZE, &menu_font_size, "menu_font_size", "menu-font-size"}, {1, gen_cmd, num_rd, num_wr, 0, 0xffffff, &G_BFU_BG_COLOR, "background_color", "menu-background-color"}, {1, gen_cmd, num_rd, num_wr, 0, 0xffffff, &G_BFU_FG_COLOR, "foreground_color", "menu-foreground-color"}, diff --git a/links.1 b/links.1 @@ -320,12 +320,6 @@ and some servers don't like it. Set IP Type-of-service to high throughput on ftp connections. .TP -\f3-smb.allow-hyperlinks-to-smb \f2<0>/<1>\f1 -Allow hyperlinks to SMB protocol. -Disabling this improves security, because internet sites cannot -exploit possible bugs in the SMB client. - -.TP \f3-menu-font-size \f2<size>\f1 Size of font in menu. diff --git a/links.h b/links.h @@ -3561,12 +3561,6 @@ struct ftp_options { extern struct ftp_options ftp_options; -struct smb_options { - int allow_hyperlinks_to_smb; -}; - -extern struct smb_options smb_options; - extern unsigned char download_dir[]; #define SCRUB_HEADERS (proxies.only_proxies || http_options.header.fake_firefox) diff --git a/sched.c b/sched.c @@ -696,8 +696,7 @@ int get_allow_flags(unsigned char *url) int disallow_url(unsigned char *url, int allow_flags) { - if (!casecmp(url, cast_uchar "smb://", 6) && !(allow_flags & ALLOW_SMB) - && !smb_options.allow_hyperlinks_to_smb) + if (!casecmp(url, cast_uchar "smb://", 6) && !(allow_flags & ALLOW_SMB)) return S_SMB_NOT_ALLOWED; if (!casecmp(url, cast_uchar "file://", 7) && !(allow_flags & ALLOW_FILE))