From 80cd939501652353e5fbf4d9d949312eda9502af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 27 Oct 2024 18:58:40 +0100 Subject: [PATCH 01/36] * src/hash.c: Include config.h in STANDALONE mode --- src/hash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hash.c b/src/hash.c index 670ec1cf6..4f88e4a1d 100644 --- a/src/hash.c +++ b/src/hash.c @@ -33,6 +33,8 @@ as that of the covered work. */ #ifndef STANDALONE # include "wget.h" +#else +# include "config.h" #endif #include From 054d79cf6560652648e809b93e163330148d01ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 27 Oct 2024 22:17:04 +0100 Subject: [PATCH 02/36] * src/utils.h (strlcpy): Use restrict keywords --- src/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.h b/src/utils.h index 2e6a979f5..da12a433a 100644 --- a/src/utils.h +++ b/src/utils.h @@ -164,7 +164,7 @@ const char *print_decimal (double); long get_max_length (const char *path, int length, int name); #ifndef HAVE_STRLCPY -size_t strlcpy (char *dst, const char *src, size_t size); +size_t strlcpy (char * restrict dst, const char * restrict src, size_t size); #endif void wg_hex_to_string (char *str_buffer, const char *hex_buffer, size_t hex_len); From 2800eb2bed5242331b1c550a67fe12d40929976e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Thu, 31 Oct 2024 09:52:24 +0100 Subject: [PATCH 03/36] * src/utils.c (compile_posix_regex): Remove redundant casts --- src/utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.c b/src/utils.c index 8c33fa5f7..b03019c72 100644 --- a/src/utils.c +++ b/src/utils.c @@ -2496,12 +2496,12 @@ compile_posix_regex (const char *str) * see https://sourceware.org/glibc/wiki/Security%20Exceptions */ str = "a"; #endif - int errcode = regcomp ((regex_t *) regex, str, REG_EXTENDED | REG_NOSUB); + int errcode = regcomp (regex, str, REG_EXTENDED | REG_NOSUB); if (errcode != 0) { - size_t errbuf_size = regerror (errcode, (regex_t *) regex, NULL, 0); + size_t errbuf_size = regerror (errcode, regex, NULL, 0); char *errbuf = xmalloc (errbuf_size); - regerror (errcode, (regex_t *) regex, errbuf, errbuf_size); + regerror (errcode, regex, errbuf, errbuf_size); fprintf (stderr, _("Invalid regular expression %s, %s\n"), quote (str), errbuf); xfree (errbuf); From 219c34fea94a1e5ba281bb9a00b3375bd6e4ffb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Fri, 1 Nov 2024 10:48:41 +0100 Subject: [PATCH 04/36] * .gitlab-ci.yml: Remove tags to fix CI --- .gitlab-ci.yml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76c7c4331..fa3a140ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,9 +69,6 @@ Build-Tarball: - make -j$(nproc) syntax-check - make -j$(nproc) dist - mv wget-*.gz .. - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget artifacts: @@ -100,9 +97,6 @@ Valgrind: - cd wget-*/ - ./configure $CONFIGURE_BASE_FLAGS --cache-file ../cache/config.cache - make check-valgrind - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget dependencies: @@ -131,9 +125,6 @@ Minimal: --disable-iri --disable-ntlm --disable-pcre --without-libpsl --without-libuuid --without-libintl-prefix - make -j$(nproc) check-valgrind - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget dependencies: @@ -160,9 +151,6 @@ Debian-OldStable: - ./configure $CONFIGURE_BASE_FLAGS --cache-file ../cache/config.cache - make - make -j$(nproc) check - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget dependencies: @@ -188,9 +176,6 @@ Debian-Stable: - cd wget-*/ - ./configure $CONFIGURE_BASE_FLAGS --cache-file ../cache/config.cache - make -j$(nproc) check - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget dependencies: @@ -217,9 +202,6 @@ CentOS-OldLTS: - ./configure $CONFIGURE_BASE_FLAGS --cache-file ../cache/config.cache - make -j$(nproc) - make -j$(nproc) check - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget dependencies: @@ -250,9 +232,6 @@ TLS/OpenSSL: - ./configure $CONFIGURE_BASE_FLAGS --cache-file ../cache/config.cache --with-ssl=openssl - make -j$(nproc) - make -j$(nproc) check-valgrind - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget dependencies: @@ -281,9 +260,6 @@ TLS/GnuTLS: - ./configure $CONFIGURE_BASE_FLAGS --cache-file ../cache/config.cache --with-ssl=gnutls - make -j$(nproc) - make -j$(nproc) check-valgrind - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget dependencies: @@ -316,9 +292,6 @@ Sanitizers: - ./configure $CONFIGURE_BASE_FLAGS --cache-file ../cache/config.cache --enable-fsanitize-asan --enable-fsanitize-ubsan - make -j$(nproc) check - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget dependencies: @@ -346,9 +319,6 @@ Scan-Build: - make -C lib -j$(nproc) - make -C src css_.o - scan-build -v -enable-checker nullability --keep-empty --status-bugs -o ../scan-build make -j$(nproc) - tags: - - shared - - linux except: - tags - coverity-scan@gnuwget/wget @@ -379,9 +349,6 @@ CoverageReports: - make -j$(nproc) fuzz-coverage - mv lcov ../fuzz-coverage - make dist - tags: - - shared - - linux dependencies: - Build-Tarball needs: ["Build-Tarball"] @@ -413,9 +380,6 @@ MinGW64: - make -j$(nproc) - cp -p src/wget.exe src/wget - make check -j$(nproc) LOG_COMPILER=wine - tags: - - shared - - linux except: - tags - coverity-scan@gnuwget/wget @@ -446,9 +410,6 @@ ArchLinux: - ./configure $CONFIGURE_BASE_FLAGS - make -j$(nproc) - make check -j$(nproc) - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget needs: [] @@ -472,9 +433,6 @@ Fedora: - touch .manywarnings - ./configure $CONFIGURE_BASE_FLAGS - make -j$(nproc) check - tags: - - shared - - linux except: - coverity-scan@gnuwget/wget needs: [] From e70dd2b0548976edd19517ea1258df589e5a46bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Fri, 1 Nov 2024 18:05:20 +0100 Subject: [PATCH 05/36] * Makefile.am: Fix creating coverage reports --- Makefile.am | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 96b6acf5b..5901b95a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -89,11 +89,11 @@ clean-lcov: check-coverage: clean clean-lcov $(MAKE) CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" - lcov --capture --initial --directory src/ --output-file $(LCOV_INFO) + lcov --capture --initial --ignore-errors range --directory src/ --output-file $(LCOV_INFO) $(MAKE) CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" VALGRIND_TESTS=0 check - lcov --capture --directory src/ --output-file $(LCOV_INFO) - lcov --remove $(LCOV_INFO) --ignore-errors unused '/usr/include/*' '*/lib/*' -o $(LCOV_INFO) - genhtml --prefix . --ignore-errors source --ignore-errors unmapped $(LCOV_INFO) --legend --title "Wget" --output-directory=lcov + lcov --capture --ignore-errors range --directory src/ --output-file $(LCOV_INFO) + lcov --remove $(LCOV_INFO) --ignore-errors range,unused '/usr/include/*' '*/lib/*' -o $(LCOV_INFO) + genhtml --prefix . --ignore-errors source,range,unmapped $(LCOV_INFO) --legend --title "Wget" --output-directory=lcov @echo @echo "You can now view the coverage report with 'xdg-open lcov/index.html'" @@ -101,9 +101,9 @@ fuzz-coverage: clean clean-lcov $(MAKE) -C lib $(MAKE) -C src CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" $(MAKE) -C fuzz check CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" - lcov --capture --initial --directory fuzz --directory src --output-file $(LCOV_INFO) - lcov --capture --directory fuzz --directory src --output-file $(LCOV_INFO) - lcov --remove $(LCOV_INFO) '/usr/include/*' '*/lib/*' -o $(LCOV_INFO) - genhtml --prefix . --ignore-errors source $(LCOV_INFO) --legend --title "Wget-fuzz" --output-directory=lcov + lcov --capture --initial --ignore-errors range --directory fuzz --directory src --output-file $(LCOV_INFO) + lcov --capture --ignore-errors range --directory fuzz --directory src --output-file $(LCOV_INFO) + lcov --remove $(LCOV_INFO) --ignore-errors range '/usr/include/*' '*/lib/*' -o $(LCOV_INFO) + genhtml --prefix . --ignore-errors source,range $(LCOV_INFO) --legend --title "Wget-fuzz" --output-directory=lcov @echo @echo "You can now view the coverage report with 'xdg-open lcov/index.html'" From 6aa6d01742e0b680a2a111d9a3da62b8e9c6bab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Fri, 1 Nov 2024 18:54:53 +0100 Subject: [PATCH 06/36] * Makefile.am: Fix check-coverage from tarball --- .gitlab-ci.yml | 4 ++-- Makefile.am | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fa3a140ba..c764e2dbf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -357,8 +357,8 @@ CoverageReports: paths: - test-coverage/ - fuzz-coverage/ - only: - - master +# only: +# - master MinGW64: stage: test-from-tarball diff --git a/Makefile.am b/Makefile.am index 5901b95a8..c569d8081 100644 --- a/Makefile.am +++ b/Makefile.am @@ -89,10 +89,10 @@ clean-lcov: check-coverage: clean clean-lcov $(MAKE) CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" - lcov --capture --initial --ignore-errors range --directory src/ --output-file $(LCOV_INFO) + lcov --capture --initial --ignore-errors source,range --directory src/ --output-file $(LCOV_INFO) $(MAKE) CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" VALGRIND_TESTS=0 check - lcov --capture --ignore-errors range --directory src/ --output-file $(LCOV_INFO) - lcov --remove $(LCOV_INFO) --ignore-errors range,unused '/usr/include/*' '*/lib/*' -o $(LCOV_INFO) + lcov --capture --ignore-errors source,range --directory src/ --output-file $(LCOV_INFO) + lcov --remove $(LCOV_INFO) --ignore-errors source,range,unused '/usr/include/*' '*/lib/*' '*/src/css.l' -o $(LCOV_INFO) genhtml --prefix . --ignore-errors source,range,unmapped $(LCOV_INFO) --legend --title "Wget" --output-directory=lcov @echo @echo "You can now view the coverage report with 'xdg-open lcov/index.html'" @@ -101,9 +101,9 @@ fuzz-coverage: clean clean-lcov $(MAKE) -C lib $(MAKE) -C src CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" $(MAKE) -C fuzz check CFLAGS="$(CFLAGS) --coverage" LDFLAGS="$(LDFLAGS) --coverage" - lcov --capture --initial --ignore-errors range --directory fuzz --directory src --output-file $(LCOV_INFO) - lcov --capture --ignore-errors range --directory fuzz --directory src --output-file $(LCOV_INFO) - lcov --remove $(LCOV_INFO) --ignore-errors range '/usr/include/*' '*/lib/*' -o $(LCOV_INFO) + lcov --capture --initial --ignore-errors source,range --directory fuzz --directory src --output-file $(LCOV_INFO) + lcov --capture --ignore-errors source,range --directory fuzz --directory src --output-file $(LCOV_INFO) + lcov --remove $(LCOV_INFO) --ignore-errors source,range '/usr/include/*' '*/lib/*' '*/src/css.l' -o $(LCOV_INFO) genhtml --prefix . --ignore-errors source,range $(LCOV_INFO) --legend --title "Wget-fuzz" --output-directory=lcov @echo @echo "You can now view the coverage report with 'xdg-open lcov/index.html'" From 9bf173e6aeda7f24ff4f40fc420d119410582b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 10 Nov 2024 11:23:21 +0100 Subject: [PATCH 07/36] * configure.ac: Drop -Wc99-c11-compat and -Wuseless-cast for manywarnings --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 5ef12fe40..996c70d8f 100644 --- a/configure.ac +++ b/configure.ac @@ -398,6 +398,8 @@ if test -n "$WARN_CFLAGS"; then nw="$nw -Wnested-externs" # Stylistic choice and we do use it in hsts code nw="$nw -Wc90-c99-compat" # gcc-12, we use C99 nw="$nw -Wlong-long" # gcc-12, we use C99 + nw="$nw -Wc99-c11-compat" # gnulib is at C11 + nw="$nw -Wuseless-cast" # gcc-14 warns about it (pretty useless for portable code) if test "$cross_compiling" = yes; then nw="$nw -Wformat" fi From 00048762c3639884fe955833c69b47c4cdfd7c99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 10 Nov 2024 11:23:43 +0100 Subject: [PATCH 08/36] * src/http.c (http_loop): Remove unused code --- src/http.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/http.c b/src/http.c index 0ff4572a9..07af1867d 100644 --- a/src/http.c +++ b/src/http.c @@ -4244,7 +4244,6 @@ http_loop (const struct url *u, struct url *original_url, char **newloc, struct stat st; bool send_head_first = true; bool force_full_retrieve = false; - bool return_local_file; /* If we are writing to a WARC file: always retrieve the whole file. */ if (opt.warc_filename != NULL) @@ -4253,11 +4252,6 @@ http_loop (const struct url *u, struct url *original_url, char **newloc, /* Assert that no value for *LOCAL_FILE was passed. */ assert (local_file == NULL || *local_file == NULL); - /* Set LOCAL_FILE parameter. */ - return_local_file = local_file && opt.output_document && !HYPHENP (opt.output_document); - -// return_local_file = (local_file && opt.output_document && !HYPHENP (opt.output_document)); - /* Reset NEWLOC parameter. */ *newloc = NULL; From 27c8c963500529b5a9d34a76cf3cda3b1ecc8a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 10 Nov 2024 11:30:34 +0100 Subject: [PATCH 09/36] * gnulib: Update --- gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnulib b/gnulib index 92cdf62b5..74b6a2a73 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 92cdf62b56462b914193c7770440e505a37c2526 +Subproject commit 74b6a2a7386cf8586c1244297d4d87dde123db42 From 44472c59b88f2c7ca41037a88a56d7631adace83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 10 Nov 2024 11:30:53 +0100 Subject: [PATCH 10/36] * bootstrap: Update from gnulib --- bootstrap | 252 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 149 insertions(+), 103 deletions(-) diff --git a/bootstrap b/bootstrap index 3173829da..3758683da 100755 --- a/bootstrap +++ b/bootstrap @@ -3,7 +3,7 @@ # Bootstrap this package from checked-out sources. -scriptversion=2023-12-10.18; # UTC +scriptversion=2024-07-04.10; # UTC # Copyright (C) 2003-2024 Free Software Foundation, Inc. # @@ -37,7 +37,7 @@ medir=`dirname "$me"` # A library of shell functions for autopull.sh, autogen.sh, and bootstrap. -scriptlibversion=2023-12-10.18; # UTC +scriptlibversion=2024-07-21.12; # UTC # Copyright (C) 2003-2024 Free Software Foundation, Inc. # @@ -478,10 +478,9 @@ find_tool () # --------------------- Preparing GNULIB_SRCDIR for use. --------------------- # This is part of autopull.sh, but bootstrap needs it too, for self-upgrading. +# cleanup_gnulib fails, removing the directory $gnulib_path first. cleanup_gnulib() { status=$? - # XXX It's a bad idea to erase the submodule directory if it contains local - # modifications. rm -fr "$gnulib_path" exit $status } @@ -499,54 +498,61 @@ prepare_GNULIB_SRCDIR () test -f "$GNULIB_SRCDIR/gnulib-tool" \ || die "Error: --gnulib-srcdir or \$GNULIB_SRCDIR is specified," \ "but does not contain gnulib-tool" - elif $use_git; then + if test -n "$GNULIB_REVISION" && $use_git; then + # The 'git checkout "$GNULIB_REVISION"' command succeeds if the + # GNULIB_REVISION is a commit hash that exists locally, or if it is + # branch name that can be fetched from origin. It fails, however, + # if the GNULIB_REVISION is a commit hash that only exists in + # origin. In this case, we need a 'git fetch' and then retry + # 'git checkout "$GNULIB_REVISION"'. + (cd "$GNULIB_SRCDIR" \ + && { git checkout "$GNULIB_REVISION" 2>/dev/null \ + || { git fetch origin && git checkout "$GNULIB_REVISION"; } + } + ) || exit $? + fi + else + if ! $use_git; then + die "Error: --no-git is specified," \ + "but neither --gnulib-srcdir nor \$GNULIB_SRCDIR is specified" + fi + if git submodule -h | grep -- --reference > /dev/null; then + : + else + die "git version is too old, git >= 1.6.4 is required" + fi gnulib_path=$(git_modules_config submodule.gnulib.path) - test -z "$gnulib_path" && gnulib_path=gnulib - - # Get gnulib files. Populate $gnulib_path, possibly updating a - # submodule, for use in the rest of the script. - - if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git \ - && git_modules_config submodule.gnulib.url >/dev/null; then - # Use GNULIB_REFDIR as a reference. - echo "$0: getting gnulib files..." - if git submodule -h|grep -- --reference > /dev/null; then - # Prefer the one-liner available in git 1.6.4 or newer. - git submodule update --init --reference "$GNULIB_REFDIR" \ - "$gnulib_path" || exit $? + if test -n "$gnulib_path"; then + # A submodule 'gnulib' is configured. + # Get gnulib files. Populate $gnulib_path, updating the submodule. + if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then + # Use GNULIB_REFDIR as a reference. + echo "$0: getting gnulib files..." + git submodule update --init --reference "$GNULIB_REFDIR" "$gnulib_path"\ + || exit $? else - # This fallback allows at least git 1.5.5. - if test -f "$gnulib_path"/gnulib-tool; then - # Since file already exists, assume submodule init already complete. + # GNULIB_REFDIR is not set or not usable. Ignore it. + if git_modules_config submodule.gnulib.url >/dev/null; then + echo "$0: getting gnulib files..." + git submodule init -- "$gnulib_path" || exit $? git submodule update -- "$gnulib_path" || exit $? else - # Older git can't clone into an empty directory. - rmdir "$gnulib_path" 2>/dev/null - git clone --reference "$GNULIB_REFDIR" \ - "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \ - && git submodule init -- "$gnulib_path" \ - && git submodule update -- "$gnulib_path" \ - || exit $? + die "Error: submodule 'gnulib' has no configured url" fi fi else - # GNULIB_REFDIR is not set or not usable. Ignore it. - if git_modules_config submodule.gnulib.url >/dev/null; then - echo "$0: getting gnulib files..." - git submodule init -- "$gnulib_path" || exit $? - git submodule update -- "$gnulib_path" || exit $? - - elif [ ! -d "$gnulib_path" ]; then + gnulib_path='gnulib' + if test ! -d "$gnulib_path"; then + # The subdirectory 'gnulib' does not yet exist. Clone into it. echo "$0: getting gnulib files..." - trap cleanup_gnulib HUP INT PIPE TERM - + gnulib_url=${GNULIB_URL:-$default_gnulib_url} shallow= if test -z "$GNULIB_REVISION"; then if git clone -h 2>&1 | grep -- --depth > /dev/null; then shallow='--depth 2' fi - git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \ + git clone $shallow "$gnulib_url" "$gnulib_path" \ || cleanup_gnulib else if git fetch -h 2>&1 | grep -- --depth > /dev/null; then @@ -562,30 +568,43 @@ prepare_GNULIB_SRCDIR () # is without fetching all commits. So fall back to fetching all # commits. git -C "$gnulib_path" init - git -C "$gnulib_path" remote add origin \ - ${GNULIB_URL:-$default_gnulib_url} + git -C "$gnulib_path" remote add origin "$gnulib_url" git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" \ || git -C "$gnulib_path" fetch origin \ || cleanup_gnulib git -C "$gnulib_path" reset --hard FETCH_HEAD + (cd "$gnulib_path" && git checkout "$GNULIB_REVISION") \ + || cleanup_gnulib fi - trap - HUP INT PIPE TERM + else + # The subdirectory 'gnulib' already exists. + if test -n "$GNULIB_REVISION"; then + if test -d "$gnulib_path/.git"; then + # The 'git checkout "$GNULIB_REVISION"' command succeeds if the + # GNULIB_REVISION is a commit hash that exists locally, or if it is + # branch name that can be fetched from origin. It fails, however, + # if the GNULIB_REVISION is a commit hash that only exists in + # origin. In this case, we need a 'git fetch' and then retry + # 'git checkout "$GNULIB_REVISION"'. + (cd "$gnulib_path" \ + && { git checkout "$GNULIB_REVISION" 2>/dev/null \ + || { git fetch origin && git checkout "$GNULIB_REVISION"; } + } + ) || exit $? + else + die "Error: GNULIB_REVISION is specified in bootstrap.conf," \ + "but '$gnulib_path' contains no git history" + fi + fi fi fi - GNULIB_SRCDIR=$gnulib_path - # Verify that the submodule contains a gnulib checkout. + # Verify that $gnulib_path contains a gnulib checkout. test -f "$gnulib_path/gnulib-tool" \ - || die "Error: $gnulib_path is supposed to contain a gnulib checkout," \ + || die "Error: '$gnulib_path' is supposed to contain a gnulib checkout," \ "but does not contain gnulib-tool" + GNULIB_SRCDIR=$gnulib_path fi - - # XXX Should this be done if $use_git is false? - if test -d "$GNULIB_SRCDIR"/.git && test -n "$GNULIB_REVISION" \ - && ! git_modules_config submodule.gnulib.url >/dev/null; then - (cd "$GNULIB_SRCDIR" && git checkout "$GNULIB_REVISION") || cleanup_gnulib - fi - # $GNULIB_SRCDIR now points to the version of gnulib to use, and # we no longer need to use git or $gnulib_path below here. } @@ -647,7 +666,8 @@ fi autopull_usage() { cat < Date: Sun, 10 Nov 2024 11:50:49 +0100 Subject: [PATCH 11/36] * configure.ac: Remove searching for makeinfo (breaks doc/ build) --- configure.ac | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/configure.ac b/configure.ac index 996c70d8f..bb06bf53f 100644 --- a/configure.ac +++ b/configure.ac @@ -725,16 +725,6 @@ elif test "x$force_ipv6" = "xyes"; then AC_MSG_ERROR([IPv6 support requested but not found; aborting]) fi -dnl -dnl Find makeinfo. We used to provide support for Emacs processing -dnl Texinfo using 'emacs -batch -eval ...' where makeinfo is -dnl unavailable, but that broke with the addition of makeinfo-specific -dnl command-line options, such as '-I'. Now we depend on makeinfo to -dnl build the Info documentation. -dnl - -AC_CHECK_PROGS(MAKEINFO, [makeinfo], [true]) - dnl dnl Find perl and pod2man dnl From 6ff5f2d2b602308e53f2f4cd6b052f76c59aa4fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 10 Nov 2024 12:18:21 +0100 Subject: [PATCH 12/36] * README: Replace FSF address with URL --- README | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index 301d51fdc..3b7cc703a 100644 --- a/README +++ b/README @@ -75,10 +75,10 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 -USA. +A copy of the GNU General Public License can be found in the file LICENSE +in the top directory of the official source distribution. The license is +also available in several formats through the World Wide Web, or +via http://www.gnu.org/licenses/licenses.html#GPL . Additional permission under GNU GPL version 3 section 7 From 1f7e094899647a52cf9157f3a6600ae801f7a98b Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 10 Nov 2024 14:57:12 +0100 Subject: [PATCH 13/36] src/utils.h: Include wget.h before stdlib.h * src/utils.h: wget.h includes config.h which should be included before any other header files. So swap the order of includes --- src/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.h b/src/utils.h index da12a433a..eb91ef2b1 100644 --- a/src/utils.h +++ b/src/utils.h @@ -31,8 +31,8 @@ as that of the covered work. */ #ifndef UTILS_H #define UTILS_H -#include #include +#include /* Constant is using when we don`t know attempted size exactly */ #define UNKNOWN_ATTEMPTED_SIZE -3 From 1bc591564d28ed11174e75e6cd8fed220c410ce1 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 16 Oct 2024 23:04:15 +0100 Subject: [PATCH 14/36] init: fix -Warray-bounds in setval_internal_tilde MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit >= GCC 12 reports an instance of -Warray-bounds in setval_internal_tilde with the default -DNDEBUG: ``` In function ‘setval_internal_tilde’, inlined from ‘run_wgetrc’ at init.c:710:16: init.c:940:17: error: array subscript [0, 167] is outside array bounds of ‘const struct [168]’ [-Werror=array-bounds=] 940 | if (((commands[comind].action == cmd_file) || | ~~~~~~~~^~~~~~~~ init.c: In function ‘run_wgetrc’: init.c:135:3: note: while referencing ‘commands’ 135 | } commands[] = { | ^~~~~~~~ ``` setval_internal_tilde calls setval_internal and stores the result in ret; setval_internal *does* check for if comind is out-of-bounds, but we only check that *after* dereferencing commands[comind]. Swap the order in the if() to fix that so we only dereference if we know it's safe. ChangeLog: * src/init.c (setval_internal_tilde): Check 'ret' earlier. Copyright-paperwork-exempt: Yes --- src/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.c b/src/init.c index 10557e305..1c4528360 100644 --- a/src/init.c +++ b/src/init.c @@ -937,9 +937,9 @@ setval_internal_tilde (int comind, const char *com, const char *val) ret = setval_internal (comind, com, val); /* We make tilde expansion for cmd_file and cmd_directory */ - if (((commands[comind].action == cmd_file) || + if (ret && ((commands[comind].action == cmd_file) || (commands[comind].action == cmd_directory)) - && ret && (*val == '~' && ISSEP (val[1]))) + && (*val == '~' && ISSEP (val[1]))) { pstring = commands[comind].place; if (opt.homedir) From 574632cca7b14e7a45aeb5c4400f3bc9a2051aa2 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 10 Nov 2024 15:12:47 +0100 Subject: [PATCH 15/36] Fix build error on MingW Gnulib does not currently implement the `F_GETFL` and `F_SETFL` flags on mingw. As a result building Wget failed on Windows. We don't currently have a good solution to this problem and Windows users of Wget will not get the new functionality of non-blocking file I/O reads. The current solution is simply to provide a Windows specific no-op stub * src/mswindows.c (set_fd_nonblocking): Provide an empty stub function for Windows systems * src/mswindows.h (set_fd_nonblocking): Export the function so it is available in util.c where it is needed * src/util.c (set_fd_nonblocking): New function to set a fd as O_NONBLOCK on non-Windows, non-MSDOS systems (wget_read_from_file): Split the O_NONBLOCK code into set_fd_nonblocking and make all file I/O non-blocking, not just stdin --- src/mswindows.c | 11 +++++++++++ src/mswindows.h | 1 + src/utils.c | 18 ++++++++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/mswindows.c b/src/mswindows.c index 5b3685607..03feea9a9 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -310,6 +310,17 @@ fake_fork (void) /* We failed, return. */ } + +/* + * This is the corresponding Windows implementation of + * set_fd_nonblocking() function in utils.c + * Currently it is an empty no-op. Maybe, we will get to + * implementing a nice solution one day + */ +void +set_fd_nonblocking(const int fd) +{} + /* This is the corresponding Windows implementation of the fork_to_background() function in utils.c. */ bool diff --git a/src/mswindows.h b/src/mswindows.h index 3409e6853..8c1a19af3 100644 --- a/src/mswindows.h +++ b/src/mswindows.h @@ -74,5 +74,6 @@ void ws_percenttitle (double); char *ws_mypath (void); void windows_main (char **); void set_windows_fd_as_blocking_socket (int); +void set_fd_nonblocking(const int); #endif /* MSWINDOWS_H */ diff --git a/src/utils.c b/src/utils.c index b03019c72..2511a25fa 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1273,6 +1273,21 @@ wget_read_file (const char *file) return wget_read_from_file(file, &left_open); } +/* + * Set a file-descriptor to be non-blocking. + * Since the needed fcntl flags are not implemented in gnulib + * for Windows, we will provide an alternate stub implementation + * in mswindows.c. The stub will be a no-op and will prevent + * asynchronous file operations on Windows, but such is life + */ +#if !defined(WINDOWS) && !defined(MSDOS) +static void set_fd_nonblocking(const int fd) +{ + int flags = fcntl(fd, F_GETFL, 0); + fcntl(fd, F_SETFL, flags | O_NONBLOCK); +} +#endif + /* Read FILE into memory. A pointer to `struct file_memory' are returned; use struct element `content' to access file contents, and the element `length' to know the file length. `content' is *not* @@ -1303,8 +1318,6 @@ wget_read_from_file (const char *file, bool *left_open) if (HYPHENP (file)) { fd = fileno (stdin); - int flags = fcntl(fd, F_GETFL, 0); - fcntl(fd, F_SETFL, flags | O_NONBLOCK); inhibit_close = true; /* Note that we don't inhibit mmap() in this case. If stdin is redirected from a regular file, mmap() will still work. */ @@ -1314,6 +1327,7 @@ wget_read_from_file (const char *file, bool *left_open) fd = open (file, O_RDONLY); if (fd < 0) return NULL; + set_fd_nonblocking(fd); fm = xnew (struct file_memory); #ifdef HAVE_MMAP From c4cb544c5dd13842456fe8773e6ec2df91f15b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 10 Nov 2024 18:00:08 +0100 Subject: [PATCH 16/36] * fuzz/wget_options_fuzzer.c: Work around issue "multiple definition of getaddrinfo" --- fuzz/wget_options_fuzzer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fuzz/wget_options_fuzzer.c b/fuzz/wget_options_fuzzer.c index a337bb191..78974d06b 100644 --- a/fuzz/wget_options_fuzzer.c +++ b/fuzz/wget_options_fuzzer.c @@ -90,6 +90,10 @@ void exit(int status) libc_exit(status); } } +// Work-around linker issue "multiple definition of `getaddrinfo'" +#ifdef _WIN32 +__attribute__ ((weak)) +#endif int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) { if (fuzzing) { From 742ed3f65cc32895e79ece93dfbb227121870360 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 10 Nov 2024 15:58:56 +0100 Subject: [PATCH 17/36] Fix returning uninitialized variable * src/retr.c (retrieve_from_file): Remove a dead store to status (retrieve_from_url_list): Initialize status to a default of RETROK --- src/retr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/retr.c b/src/retr.c index f54a8083d..5422963c1 100644 --- a/src/retr.c +++ b/src/retr.c @@ -1182,6 +1182,8 @@ static uerr_t retrieve_from_url_list(struct urlpos *url_list, int *count, struct struct urlpos *cur_url; uerr_t status; + status = RETROK; /* Suppose everything is OK. */ + for (cur_url = url_list; cur_url; cur_url = cur_url->next, ++*count) { char *filename = NULL, *new_file = NULL, *proxy; @@ -1267,7 +1269,6 @@ retrieve_from_file (const char *file, bool html, int *count) char *input_file, *url_file = NULL; const char *url = file; - status = RETROK; /* Suppose everything is OK. */ *count = 0; /* Reset the URL count. */ /* sXXXav : Assume filename and links in the file are in the locale */ From 5f8d5703122da6e74138c1e7380f2d9739fe0f33 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 10 Nov 2024 16:46:16 +0100 Subject: [PATCH 18/36] Fix a static analysis false positive Clang's static analyzer believes that it is possible for a realloc request to return NULL. However, the `xrealloc` implementation used in Wget will trigger a program crash if enough memory couldn't be found. I'm not sure why the analyzer isn't able to see that. But let's pacify it by asserting here that xrealloc will always return a non-null * src/wget.h (DO_REALLOC): Assert that xrealloc will always return non-null --- src/wget.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wget.h b/src/wget.h index c33407253..47fcb6db0 100644 --- a/src/wget.h +++ b/src/wget.h @@ -222,6 +222,7 @@ static inline unsigned char _unhex(unsigned char c) } \ if (DR_newsize) { \ void *basevar_new = xrealloc (basevar, DR_newsize * sizeof (type)); \ + assert(basevar_new); \ if (basevar_new != basevar) { \ memset (basevar_new + sizevar_old * sizeof (type), 0, (DR_newsize - sizevar_old) * sizeof (type)); \ basevar = basevar_new; \ From 75840173bb6cbb57fb9d3e5cb3137a2bb554a9da Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 10 Nov 2024 18:49:46 +0100 Subject: [PATCH 19/36] Revert "* configure.ac: Remove searching for makeinfo (breaks doc/ build)" This reverts commit 04053a7c1e31ec848d503282d510c99545b6ae16. --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index bb06bf53f..996c70d8f 100644 --- a/configure.ac +++ b/configure.ac @@ -725,6 +725,16 @@ elif test "x$force_ipv6" = "xyes"; then AC_MSG_ERROR([IPv6 support requested but not found; aborting]) fi +dnl +dnl Find makeinfo. We used to provide support for Emacs processing +dnl Texinfo using 'emacs -batch -eval ...' where makeinfo is +dnl unavailable, but that broke with the addition of makeinfo-specific +dnl command-line options, such as '-I'. Now we depend on makeinfo to +dnl build the Info documentation. +dnl + +AC_CHECK_PROGS(MAKEINFO, [makeinfo], [true]) + dnl dnl Find perl and pod2man dnl From c284e9162a97d4622acaae9a479876fa1a9c2670 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 10 Nov 2024 19:54:33 +0100 Subject: [PATCH 20/36] * doc/wget.texi: Document the new non-blocking read feature --- doc/wget.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/wget.texi b/doc/wget.texi index 6d26fbb8e..1d026d72a 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -513,6 +513,13 @@ treated as @samp{html} if the Content-Type matches @samp{text/html}. Furthermore, the @var{file}'s location will be implicitly used as base href if none was specified. +If the @var{file} is a local file, on systems that support it, it will be +opened with the @code{O_NONBLOCK} flag to allow non-blocking reads from the +file. @samp{Wget} will attempt to continue reading from the file until +EOF is reached or it is closed. This allows one to stream a list of files +for retrieval where the list is dynamically generated during the execution +of the process. Currently, this feature is not available on Windows platforms. + @cindex input-metalink @item --input-metalink=@var{file} Downloads files covered in local Metalink @var{file}. Metalink version 3 From a78b0d4da405cd46232fe0a1632f8591c4da0eba Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 10 Nov 2024 20:10:18 +0100 Subject: [PATCH 21/36] * contrib/make-release: Fix missing variables --- contrib/make-release | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/contrib/make-release b/contrib/make-release index dc4832626..1d252ac44 100755 --- a/contrib/make-release +++ b/contrib/make-release @@ -52,7 +52,7 @@ case $REL_TYPE_IN in esac echo "This script will make a new release and upload it to the GNU FTP Servers" -echo "Will run git clean -dxf to get a clean dir" +echo "Will run \`git clean -dxf\` to get a clean dir" ask_continue # Make sure we have a clean working directory @@ -60,11 +60,15 @@ git clean -dxfq echo "=> Bootstrap" ./bootstrap > /dev/null 2>&1 -autoreconf -ivf + +echo "=> autoreconf" +autoreconf -if echo "=> Configure" ./configure -q +APP_NAME=$(grep "^PACKAGE_NAME='" configure | cut -d "'" -f2) + echo "Building $APP_NAME v$VERSION $REL_TYPE" ask_continue @@ -74,13 +78,6 @@ sed -n "${LNO_CVER},${LNO_PVER}p" NEWS echo "This is the current contents of your NEWS" ask_continue -export RELEASE="$VERSION $REL_TYPE" - -echo "=> Making release-commit" -make -s release-commit - -echo "=> Make release" -make -s release GPG_KEY= while [ -z $GPG_KEY ]; do @@ -92,20 +89,16 @@ while [ -z $GPG_KEY ]; do [ "$x" = "y" ] || [ "$x" = "Y" ] && GPG_KEY="$key" done -echo "" +export RELEASE="$VERSION $REL_TYPE" +export GNUPLOADFLAGS="--user $GPG_KEY --symlink-regex" -upload_command=$(make -s emit_upload_commands \ - | sponge \ - | head -n3 \ - | tail -1 \ - | sed "s/--to/--user $GPG_KEY --symlink-regex --to/g" -) +echo "=> Making release" +make -s release-commit release RELEASE="$RELEASE" GNUPLOADFLAGS="$GNUPLOADFLAGS" echo "=> Uploading" echo "Upload tarballs?" -echo "$upload_command" ask_continue -$upload_command +make upload RELEASE="$RELEASE" GNUPLOADFLAGS="$GNUPLOADFLAGS" if [[ $REL_TYPE == "stable" ]]; then export CVSROOT=:ext:${CVSUSER:-${USER}}@cvs.savannah.gnu.org:/web/wget From c419542d956a2607bbce5df64b9d378a8588d778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 27 Oct 2024 19:53:14 +0100 Subject: [PATCH 22/36] Fix CVE-2024-10524 (drop support for shorthand URLs) * doc/wget.texi: Add documentation for removed support for shorthand URLs. * src/html-url.c (src/html-url.c): Call maybe_prepend_scheme. * src/main.c (main): Likewise. * src/retr.c (getproxy): Likewise. * src/url.c: Rename definition of rewrite_shorthand_url to maybe_prepend_scheme, add new function is_valid_port. * src/url.h: Rename declaration of rewrite_shorthand_url to maybe_prepend_scheme. Reported-by: Goni Golan --- doc/wget.texi | 12 ++++------- src/html-url.c | 2 +- src/main.c | 2 +- src/retr.c | 2 +- src/url.c | 57 ++++++++++++++++---------------------------------- src/url.h | 2 +- 6 files changed, 26 insertions(+), 51 deletions(-) diff --git a/doc/wget.texi b/doc/wget.texi index 1d026d72a..d46da375e 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -314,8 +314,8 @@ for text files. Here is an example: ftp://host/directory/file;type=a @end example -Two alternative variants of @sc{url} specification are also supported, -because of historical (hysterical?) reasons and their widespreaded use. +The two alternative variants of @sc{url} specifications are no longer +supported because of security considerations: @sc{ftp}-only syntax (supported by @code{NcFTP}): @example @@ -327,12 +327,8 @@ host:/dir/file host[:port]/dir/file @end example -These two alternative forms are deprecated, and may cease being -supported in the future. - -If you do not understand the difference between these notations, or do -not know which one to use, just use the plain ordinary format you use -with your favorite browser, like @code{Lynx} or @code{Netscape}. +These two alternative forms have been deprecated long time ago, +and support is removed with version 1.22.0. @c man begin OPTIONS diff --git a/src/html-url.c b/src/html-url.c index 8e9600922..99914943c 100644 --- a/src/html-url.c +++ b/src/html-url.c @@ -932,7 +932,7 @@ get_urls_file (const char *file, bool *read_again) url_text = merged; } - new_url = rewrite_shorthand_url (url_text); + new_url = maybe_prepend_scheme (url_text); if (new_url) { xfree (url_text); diff --git a/src/main.c b/src/main.c index 77b1a0b6f..6858d2da4 100644 --- a/src/main.c +++ b/src/main.c @@ -2126,7 +2126,7 @@ only if outputting to a regular file.\n")); struct iri *iri = iri_new (); struct url *url_parsed; - t = rewrite_shorthand_url (argv[optind]); + t = maybe_prepend_scheme (argv[optind]); if (!t) t = argv[optind]; diff --git a/src/retr.c b/src/retr.c index 5422963c1..26eb9f172 100644 --- a/src/retr.c +++ b/src/retr.c @@ -1546,7 +1546,7 @@ getproxy (struct url *u) /* Handle shorthands. `rewritten_storage' is a kludge to allow getproxy() to return static storage. */ - rewritten_url = rewrite_shorthand_url (proxy); + rewritten_url = maybe_prepend_scheme (proxy); if (rewritten_url) return rewritten_url; diff --git a/src/url.c b/src/url.c index 07c3bc876..2f27c48a4 100644 --- a/src/url.c +++ b/src/url.c @@ -594,60 +594,39 @@ parse_credentials (const char *beg, const char *end, char **user, char **passwd) return true; } -/* Used by main.c: detect URLs written using the "shorthand" URL forms - originally popularized by Netscape and NcFTP. HTTP shorthands look - like this: - - www.foo.com[:port]/dir/file -> http://www.foo.com[:port]/dir/file - www.foo.com[:port] -> http://www.foo.com[:port] - - FTP shorthands look like this: - - foo.bar.com:dir/file -> ftp://foo.bar.com/dir/file - foo.bar.com:/absdir/file -> ftp://foo.bar.com//absdir/file +static bool is_valid_port(const char *p) +{ + unsigned port = (unsigned) atoi (p); + if (port == 0 || port > 65535) + return false; - If the URL needs not or cannot be rewritten, return NULL. */ + int digits = strspn (p, "0123456789"); + return digits && (p[digits] == '/' || p[digits] == '\0'); +} +/* Prepend "http://" to url if scheme is missing, otherwise return NULL. */ char * -rewrite_shorthand_url (const char *url) +maybe_prepend_scheme (const char *url) { - const char *p; - char *ret; - if (url_scheme (url) != SCHEME_INVALID) return NULL; - /* Look for a ':' or '/'. The former signifies NcFTP syntax, the - latter Netscape. */ - p = strpbrk (url, ":/"); + const char *p = strchr (url, ':'); if (p == url) return NULL; /* If we're looking at "://", it means the URL uses a scheme we don't support, which may include "https" when compiled without - SSL support. Don't bogusly rewrite such URLs. */ + SSL support. Don't bogusly prepend "http://" to such URLs. */ if (p && p[0] == ':' && p[1] == '/' && p[2] == '/') return NULL; - if (p && *p == ':') - { - /* Colon indicates ftp, as in foo.bar.com:path. Check for - special case of http port number ("localhost:10000"). */ - int digits = strspn (p + 1, "0123456789"); - if (digits && (p[1 + digits] == '/' || p[1 + digits] == '\0')) - goto http; - - /* Turn "foo.bar.com:path" to "ftp://foo.bar.com/path". */ - if ((ret = aprintf ("ftp://%s", url)) != NULL) - ret[6 + (p - url)] = '/'; - } - else - { - http: - /* Just prepend "http://" to URL. */ - ret = aprintf ("http://%s", url); - } - return ret; + if (p && p[0] == ':' && !is_valid_port (p + 1)) + return NULL; + + + fprintf(stderr, "Prepended http:// to '%s'\n", url); + return aprintf ("http://%s", url); } static void split_path (const char *, char **, char **); diff --git a/src/url.h b/src/url.h index 2dfbf30b3..7796a21cd 100644 --- a/src/url.h +++ b/src/url.h @@ -128,7 +128,7 @@ char *uri_merge (const char *, const char *); int mkalldirs (const char *); -char *rewrite_shorthand_url (const char *); +char *maybe_prepend_scheme (const char *); bool schemes_are_similar_p (enum url_scheme a, enum url_scheme b); bool are_urls_equal (const char *u1, const char *u2); From 93748f4c631c0f178e5917bae0a5e76c6ef57a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 10 Nov 2024 13:07:31 +0100 Subject: [PATCH 23/36] * NEWS: Update for release 1.25.0 --- NEWS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NEWS b/NEWS index 98ce7759a..806a967d4 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,15 @@ GNU Wget NEWS -- history of user-visible changes. * Noteworthy changes in release ?.? (????-??-??) [?] +** [Breaking change] Drop support for shorthand FTP URLs (CVE-2024-10524) + +** [Breaking change] Switch to continuous reading from stdin pipes + +** Reimplement user-info parsing based on RFC 2396 + +** Fix a build issue with libproxy and --disable-debug + + * Noteworthy changes in release 1.24.5 (2024-03-10) [stable] From abb989138731341e5cfd285d272b24afb60fd1a9 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 10 Nov 2024 22:29:04 +0100 Subject: [PATCH 24/36] version 1.25.0 * NEWS: Record release date. --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 806a967d4..99c672354 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ GNU Wget NEWS -- history of user-visible changes. -* Noteworthy changes in release ?.? (????-??-??) [?] +* Noteworthy changes in release 1.25.0 (2024-11-10) [stable] ** [Breaking change] Drop support for shorthand FTP URLs (CVE-2024-10524) From ea4009026bb97e278c32df08995a5454e95f4119 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 10 Nov 2024 22:31:47 +0100 Subject: [PATCH 25/36] maint: post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. --- .prev-version | 2 +- NEWS | 3 +++ cfg.mk | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.prev-version b/.prev-version index 6521720b4..ad2191947 100644 --- a/.prev-version +++ b/.prev-version @@ -1 +1 @@ -1.24.5 +1.25.0 diff --git a/NEWS b/NEWS index 99c672354..08a72a728 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ GNU Wget NEWS -- history of user-visible changes. +* Noteworthy changes in release ?.? (????-??-??) [?] + + * Noteworthy changes in release 1.25.0 (2024-11-10) [stable] ** [Breaking change] Drop support for shorthand FTP URLs (CVE-2024-10524) diff --git a/cfg.mk b/cfg.mk index f9a028212..e250cd979 100644 --- a/cfg.mk +++ b/cfg.mk @@ -33,5 +33,5 @@ VC_LIST_ALWAYS_EXCLUDE_REGEX = ^ABOUT-NLS|((msdos|vms)/.*)|ChangeLog-2014-12-10| update-copyright-env = UPDATE_COPYRIGHT_USE_INTERVALS=1 generated_files = -old_NEWS_hash = b80dbf02602654e200d7cbce7aeda8d2 +old_NEWS_hash = 20a35ad12d4ab87d7aaa2f740b2e2333 manual_title = $(VERSION) From d98df662121977f3d3ba69d0cfbd4d3322714f2d Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Fri, 15 Nov 2024 22:28:41 +0100 Subject: [PATCH 26/36] * src/url.c (maybe_prepend_scheme): Print message only in verbose mode --- src/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/url.c b/src/url.c index 2f27c48a4..913db4f19 100644 --- a/src/url.c +++ b/src/url.c @@ -625,7 +625,7 @@ maybe_prepend_scheme (const char *url) return NULL; - fprintf(stderr, "Prepended http:// to '%s'\n", url); + logprintf (LOG_VERBOSE, _ ("Prepended http:// to '%s'\n"), url); return aprintf ("http://%s", url); } From 362a8cf1030d1660e6e101f7f061baee06363da3 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Fri, 15 Nov 2024 23:42:23 +0100 Subject: [PATCH 27/36] * gnulib: Pull forward --- gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnulib b/gnulib index 74b6a2a73..72abb08f4 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 74b6a2a7386cf8586c1244297d4d87dde123db42 +Subproject commit 72abb08f4495bf232736f4d13a24bced72a9c327 From 3388a22b10dbda015005ddfb8fe7fc1c04f6e069 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Fri, 15 Nov 2024 23:48:49 +0100 Subject: [PATCH 28/36] Fix a minor doc error doc/wget.texi: In the documentation for --tries, clarify that Wget tries 20 times, not retries. It actually retries only 19 times Reported-by: Gert Robben --- doc/wget.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/wget.texi b/doc/wget.texi index d46da375e..ab4ff1dcf 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -634,7 +634,7 @@ Wget needs to be built with libcares for this option to be available. @item -t @var{number} @itemx --tries=@var{number} Set number of tries to @var{number}. Specify 0 or @samp{inf} for -infinite retrying. The default is to retry 20 times, with the exception +infinite retrying. The default is to try 20 times, with the exception of fatal errors like ``connection refused'' or ``not found'' (404), which are not retried. From 74e4c0d2096c1a5a29b1498278e8b90d7211e2be Mon Sep 17 00:00:00 2001 From: Hugh Lilly Date: Sun, 27 Apr 2025 00:12:17 +0000 Subject: [PATCH 29/36] =?UTF-8?q?*=20main.c:=20Fix=20typo=20=E2=80=9Cmore?= =?UTF-8?q?=20then=201=E2=80=9D=20in=20help=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copyright-paperwork-exempt: Yes --- src/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 6858d2da4..ebe975f7e 100644 --- a/src/main.c +++ b/src/main.c @@ -696,13 +696,13 @@ Download:\n"), --read-timeout=SECS set the read timeout to SECS\n"), N_("\ -w, --wait=SECONDS wait SECONDS between retrievals\n\ - (applies if more then 1 URL is to be retrieved)\n"), + (applies if more than 1 URL is to be retrieved)\n"), N_("\ --waitretry=SECONDS wait 1..SECONDS between retries of a retrieval\n\ - (applies if more then 1 URL is to be retrieved)\n"), + (applies if more than 1 URL is to be retrieved)\n"), N_("\ --random-wait wait from 0.5*WAIT...1.5*WAIT secs between retrievals\n\ - (applies if more then 1 URL is to be retrieved)\n"), + (applies if more than 1 URL is to be retrieved)\n"), N_("\ --no-proxy explicitly turn off proxy\n"), N_("\ From dd59457d3fe00f62b7288bb7a2af90bddf8ded4b Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Mon, 2 Feb 2026 22:01:29 +0100 Subject: [PATCH 30/36] gnulib: Pull forward --- gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnulib b/gnulib index 72abb08f4..06f06019b 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 72abb08f4495bf232736f4d13a24bced72a9c327 +Subproject commit 06f06019b66cd443e715014e4c49f64ceb61edfe From 9781f4387783e0860829e2cb2822f9605b07c47f Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Mon, 2 Feb 2026 22:04:08 +0100 Subject: [PATCH 31/36] bootstrap: Update bootstrap script --- bootstrap | 169 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 108 insertions(+), 61 deletions(-) diff --git a/bootstrap b/bootstrap index 3758683da..19f9424bb 100755 --- a/bootstrap +++ b/bootstrap @@ -3,9 +3,9 @@ # Bootstrap this package from checked-out sources. -scriptversion=2024-07-04.10; # UTC +scriptversion=2025-06-10.02; # UTC -# Copyright (C) 2003-2024 Free Software Foundation, Inc. +# Copyright (C) 2003-2026 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,9 +37,9 @@ medir=`dirname "$me"` # A library of shell functions for autopull.sh, autogen.sh, and bootstrap. -scriptlibversion=2024-07-21.12; # UTC +scriptlibversion=2025-12-04.19; # UTC -# Copyright (C) 2003-2024 Free Software Foundation, Inc. +# Copyright (C) 2003-2026 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -72,7 +72,7 @@ export LC_ALL # Honor $PERL, but work even if there is none. PERL="${PERL-perl}" -default_gnulib_url=https://git.savannah.gnu.org/git/gnulib.git +default_gnulib_url=https://https.git.savannah.gnu.org/git/gnulib.git # Copyright year, for the --version output. copyright_year=`echo "$scriptlibversion" | sed -e 's/[^0-9].*//'` @@ -152,7 +152,8 @@ po_download_command_format=\ "wget --mirror --level=1 -nd -nv -A.po -P '%s' \ https://translationproject.org/latest/%s/" -# Prefer a non-empty tarname (4th argument of AC_INIT if given), else +# When extracting the package name from an AC_INIT invocation, +# prefer a non-empty tarname (4th argument of AC_INIT if given), else # fall back to the package name (1st argument with munging). extract_package_name=' /^AC_INIT(\[*/{ @@ -164,17 +165,20 @@ extract_package_name=' q } s/[],)].*// - s/^GNU // - y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g p } ' -package=$(${AUTOCONF:-autoconf} --trace AC_INIT:\$4 configure.ac 2>/dev/null) +normalize_package_name=' + s/^GNU // + y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g +' +package=$(${AUTOCONF:-autoconf} --trace 'AC_INIT:$4' configure.ac 2>/dev/null) if test -z "$package"; then package=$(sed -n "$extract_package_name" configure.ac) \ || die 'cannot find package name in configure.ac' fi +package=$(echo "$package" | sed "$normalize_package_name") gnulib_name=lib$package build_aux=build-aux @@ -505,11 +509,10 @@ prepare_GNULIB_SRCDIR () # if the GNULIB_REVISION is a commit hash that only exists in # origin. In this case, we need a 'git fetch' and then retry # 'git checkout "$GNULIB_REVISION"'. - (cd "$GNULIB_SRCDIR" \ - && { git checkout "$GNULIB_REVISION" 2>/dev/null \ - || { git fetch origin && git checkout "$GNULIB_REVISION"; } - } - ) || exit $? + git -C "$GNULIB_SRCDIR" checkout "$GNULIB_REVISION" 2>/dev/null \ + || { git -C "$GNULIB_SRCDIR" fetch origin \ + && git -C "$GNULIB_SRCDIR" checkout "$GNULIB_REVISION"; } \ + || exit $? fi else if ! $use_git; then @@ -547,34 +550,78 @@ prepare_GNULIB_SRCDIR () echo "$0: getting gnulib files..." trap cleanup_gnulib HUP INT PIPE TERM gnulib_url=${GNULIB_URL:-$default_gnulib_url} - shallow= - if test -z "$GNULIB_REVISION"; then - if git clone -h 2>&1 | grep -- --depth > /dev/null; then - shallow='--depth 2' - fi - git clone $shallow "$gnulib_url" "$gnulib_path" \ - || cleanup_gnulib + if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then + # Use GNULIB_REFDIR as a reference. + git clone "$GNULIB_REFDIR" "$gnulib_path" \ + && git -C "$gnulib_path" remote set-url origin "$gnulib_url" \ + && if test -z "$GNULIB_REVISION"; then + git -C "$gnulib_path" pull origin \ + && { + # We want the default branch of "$gnulib_url" (since that's + # the behaviour if GNULIB_REFDIR is not specified), not the + # current branch of "$GNULIB_REFDIR". + default_branch=`LC_ALL=C git -C "$gnulib_path" \ + remote show origin \ + | sed -n -e 's/^ *HEAD branch: //p'` + test -n "$default_branch" || default_branch='master' + git -C "$gnulib_path" checkout "$default_branch" + } + else + # The 'git checkout "$GNULIB_REVISION"' command succeeds if the + # GNULIB_REVISION is a commit hash that exists locally, or if it + # is a branch name that can be fetched from origin. It fails, + # however, if the GNULIB_REVISION is a commit hash that only + # exists in origin. In this case, we need a 'git fetch' and then + # retry 'git checkout "$GNULIB_REVISION"'. + git -C "$gnulib_path" checkout "$GNULIB_REVISION" 2>/dev/null \ + || { git -C "$gnulib_path" fetch origin \ + && git -C "$gnulib_path" checkout "$GNULIB_REVISION"; } + fi \ + || cleanup_gnulib else - if git fetch -h 2>&1 | grep -- --depth > /dev/null; then - shallow='--depth 2' + # GNULIB_REFDIR is not set or not usable. Ignore it. + shallow='--depth 2' + if test -z "$GNULIB_REVISION"; then + git clone $shallow "$gnulib_url" "$gnulib_path" \ + || cleanup_gnulib + else + # Only want a shallow checkout of $GNULIB_REVISION, but git does not + # support cloning by commit hash. So attempt a shallow fetch by + # commit hash to minimize the amount of data downloaded and changes + # needed to be processed, which can drastically reduce download and + # processing time for checkout. If the fetch by commit fails, a + # shallow fetch cannot be performed because we do not know what the + # depth of the commit is without fetching all commits. So fall back + # to fetching all commits. + # $GNULIB_REVISION can be a commit id, a tag name, or a branch name. + mkdir -p "$gnulib_path" + # Use a -c option to silence an annoying message + # "hint: Using 'master' as the name for the initial branch." + # (cf. ). + git -C "$gnulib_path" -c init.defaultBranch=master init + git -C "$gnulib_path" remote add origin "$gnulib_url" + if git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" + then + # "git fetch" of the specific commit succeeded. + git -C "$gnulib_path" reset --hard FETCH_HEAD \ + || cleanup_gnulib + # "git fetch" does not fetch tags (at least in git version 2.43). + # If $GNULIB_REVISION is a tag (not a commit id or branch name), + # add the tag explicitly. + revision=`git -C "$gnulib_path" log -1 --pretty=format:%H` + branch=`LC_ALL=C git -C "$gnulib_path" remote show origin \ + | sed -n -e 's/^ \([^ ]*\) * tracked$/\1/p'` + test "$revision" = "$GNULIB_REVISION" \ + || test "$branch" = "$GNULIB_REVISION" \ + || git -C "$gnulib_path" tag "$GNULIB_REVISION" + else + # Fetch the entire repository. + git -C "$gnulib_path" fetch origin \ + || cleanup_gnulib + git -C "$gnulib_path" checkout "$GNULIB_REVISION" \ + || cleanup_gnulib + fi fi - mkdir -p "$gnulib_path" - # Only want a shallow checkout of $GNULIB_REVISION, but git does not - # support cloning by commit hash. So attempt a shallow fetch by commit - # hash to minimize the amount of data downloaded and changes needed to - # be processed, which can drastically reduce download and processing - # time for checkout. If the fetch by commit fails, a shallow fetch can - # not be performed because we do not know what the depth of the commit - # is without fetching all commits. So fall back to fetching all - # commits. - git -C "$gnulib_path" init - git -C "$gnulib_path" remote add origin "$gnulib_url" - git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" \ - || git -C "$gnulib_path" fetch origin \ - || cleanup_gnulib - git -C "$gnulib_path" reset --hard FETCH_HEAD - (cd "$gnulib_path" && git checkout "$GNULIB_REVISION") \ - || cleanup_gnulib fi trap - HUP INT PIPE TERM else @@ -582,16 +629,15 @@ prepare_GNULIB_SRCDIR () if test -n "$GNULIB_REVISION"; then if test -d "$gnulib_path/.git"; then # The 'git checkout "$GNULIB_REVISION"' command succeeds if the - # GNULIB_REVISION is a commit hash that exists locally, or if it is - # branch name that can be fetched from origin. It fails, however, - # if the GNULIB_REVISION is a commit hash that only exists in - # origin. In this case, we need a 'git fetch' and then retry - # 'git checkout "$GNULIB_REVISION"'. - (cd "$gnulib_path" \ - && { git checkout "$GNULIB_REVISION" 2>/dev/null \ - || { git fetch origin && git checkout "$GNULIB_REVISION"; } - } - ) || exit $? + # GNULIB_REVISION is a commit hash that exists locally, or if it + # is a branch name that can be fetched from origin. It fails, + # however, if the GNULIB_REVISION is a commit hash that only + # exists in origin. In this case, we need a 'git fetch' and then + # retry 'git checkout "$GNULIB_REVISION"'. + git -C "$gnulib_path" checkout "$GNULIB_REVISION" 2>/dev/null \ + || { git -C "$gnulib_path" fetch origin \ + && git -C "$gnulib_path" checkout "$GNULIB_REVISION"; } \ + || exit $? else die "Error: GNULIB_REVISION is specified in bootstrap.conf," \ "but '$gnulib_path' contains no git history" @@ -721,7 +767,8 @@ Gnulib sources can be fetched in various ways: * Otherwise, if the 'gnulib' directory does not exist, Gnulib sources are cloned into that directory using git from \$GNULIB_URL, defaulting - to $default_gnulib_url. + to $default_gnulib_url; if GNULIB_REFDIR is set and is a git repository + its contents may be used to accelerate the process. If the configuration variable GNULIB_REVISION is set in bootstrap.conf, then that revision is checked out. @@ -814,7 +861,8 @@ autopull() elif check_exists git-merge-changelog; then echo "$0: initializing git-merge-changelog driver" git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' - git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' + git config merge.merge-changelog.driver \ + 'git-merge-changelog %O %A %B "%Y"' else echo "$0: consider installing git-merge-changelog from gnulib" fi @@ -889,9 +937,7 @@ update_po_files() { && ls "$ref_po_dir"/*.po 2>/dev/null | sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return - langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g') - test "$langs" = '*' && langs=x - for po in $langs; do + for po in x $(ls $ref_po_dir | sed -n 's/\.po$//p'); do case $po in x) continue;; esac new_po="$ref_po_dir/$po.po" cksum_file="$ref_po_dir/$po.s1" @@ -1292,7 +1338,7 @@ autogen() # Invoke autoreconf with --force --install to ensure upgrades of tools # such as ylwrap. - AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS" + AUTORECONFFLAGS="--verbose --install --force $ACLOCAL_FLAGS" AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive" # Tell autoreconf not to invoke autopoint or libtoolize; they were run above. @@ -1354,7 +1400,7 @@ autogen() || die 'cannot generate runtime-po/Makevars' # Copy identical files from po to runtime-po. - (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + cp -p po/Makefile.in.in po/*-quot po/*.header po/*.sed po/*.sin runtime-po fi fi @@ -1368,7 +1414,7 @@ autogen() # Local Variables: # eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptlibversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-format: "%Y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: @@ -1456,7 +1502,8 @@ Gnulib sources can be fetched in various ways: * Otherwise, if the 'gnulib' directory does not exist, Gnulib sources are cloned into that directory using git from \$GNULIB_URL, defaulting - to $default_gnulib_url. + to $default_gnulib_url; if GNULIB_REFDIR is set and is a git repository + its contents may be used to accelerate the process. If the configuration variable GNULIB_REVISION is set in bootstrap.conf, then that revision is checked out. @@ -1578,7 +1625,7 @@ fi # Local Variables: # eval: (add-hook 'before-save-hook 'time-stamp nil t) # time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-format: "%Y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: From 39f4a68eecd2699e3621cb50d37c7858b9a10ad6 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Mon, 2 Feb 2026 22:55:30 +0100 Subject: [PATCH 32/36] all: Update Copyright years --- Makefile.am | 3 ++- NEWS | 2 +- README | 2 +- README.checkout | 2 +- bootstrap.conf | 3 ++- build-aux/build_info.pl | 6 +++--- configure.ac | 4 ++-- contrib/commit-check | 2 +- doc/Makefile.am | 4 ++-- doc/fdl.texi | 4 ++-- doc/texi2pod.pl | 4 ++-- doc/wget.texi | 2 +- fuzz/fuzzer.h | 2 +- fuzz/glob_crash.c | 2 +- fuzz/main.c | 2 +- fuzz/run-afl.sh | 2 +- fuzz/run-clang.sh | 2 +- fuzz/wget_cookie_fuzzer.c | 2 +- fuzz/wget_css_fuzzer.c | 2 +- fuzz/wget_ftpls_fuzzer.c | 2 +- fuzz/wget_html_fuzzer.c | 2 +- fuzz/wget_netrc_fuzzer.c | 2 +- fuzz/wget_ntlm_fuzzer.c | 3 ++- fuzz/wget_options_fuzzer.c | 2 +- fuzz/wget_progress_fuzzer.c | 3 ++- fuzz/wget_read_hunk_fuzzer.c | 2 +- fuzz/wget_robots_fuzzer.c | 2 +- fuzz/wget_url_fuzzer.c | 2 +- m4/wget.m4 | 3 ++- m4/wget_manywarnings.m4 | 2 +- po/POTFILES.in | 3 ++- src/Makefile.am | 4 ++-- src/connect.c | 4 ++-- src/connect.h | 4 ++-- src/convert.c | 2 +- src/convert.h | 4 ++-- src/cookies.c | 4 ++-- src/cookies.h | 4 ++-- src/css-tokens.h | 2 +- src/css-url.c | 4 ++-- src/css-url.h | 2 +- src/css.l | 2 +- src/exits.c | 4 ++-- src/exits.h | 4 ++-- src/ftp-basic.c | 2 +- src/ftp-ls.c | 4 ++-- src/ftp-opie.c | 4 ++-- src/ftp.c | 2 +- src/ftp.h | 4 ++-- src/gnutls.c | 4 ++-- src/hash.c | 4 ++-- src/hash.h | 2 +- src/host.c | 4 ++-- src/host.h | 4 ++-- src/hsts.c | 4 ++-- src/hsts.h | 4 ++-- src/html-parse.c | 4 ++-- src/html-parse.h | 4 ++-- src/html-url.c | 4 ++-- src/html-url.h | 4 ++-- src/http-ntlm.c | 4 ++-- src/http-ntlm.h | 2 +- src/http.c | 2 +- src/http.h | 4 ++-- src/init.c | 2 +- src/init.h | 4 ++-- src/iri.c | 4 ++-- src/iri.h | 4 ++-- src/log.c | 4 ++-- src/log.h | 4 ++-- src/main.c | 3 ++- src/metalink.c | 2 +- src/metalink.h | 2 +- src/mswindows.c | 2 +- src/mswindows.h | 4 ++-- src/netrc.c | 2 +- src/netrc.h | 2 +- src/openssl.c | 4 ++-- src/options.h | 4 ++-- src/progress.c | 4 ++-- src/progress.h | 4 ++-- src/ptimer.c | 4 ++-- src/ptimer.h | 4 ++-- src/recur.c | 4 ++-- src/recur.h | 4 ++-- src/res.c | 2 +- src/res.h | 2 +- src/retr.c | 2 +- src/retr.h | 4 ++-- src/spider.c | 4 ++-- src/spider.h | 4 ++-- src/ssl.h | 4 ++-- src/sysdep.h | 4 ++-- src/url.c | 4 ++-- src/url.h | 4 ++-- src/utils.c | 4 ++-- src/utils.h | 4 ++-- src/version.h | 3 ++- src/warc.c | 4 ++-- src/wget.h | 4 ++-- src/xattr.c | 2 +- src/xattr.h | 2 +- testenv/Makefile.am | 3 ++- tests/Makefile.am | 4 ++-- tests/unit-tests.c | 4 ++-- tests/unit-tests.h | 4 ++-- util/Makefile.am | 4 ++-- util/paramcheck.pl | 4 ++-- util/rmold.pl | 4 ++-- 109 files changed, 179 insertions(+), 170 deletions(-) diff --git a/Makefile.am b/Makefile.am index c569d8081..977cbde97 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,6 @@ # Makefile for `Wget' utility -# Copyright (C) 1995-1997, 2006-2024 Free Software Foundation, Inc. +# Copyright (C) 1995-1997, 2006-2024, 2026 Free Software Foundation, +# Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/NEWS b/NEWS index 08a72a728..28ebc27ff 100644 --- a/NEWS +++ b/NEWS @@ -1230,7 +1230,7 @@ geturl -vo log http://fly.cc.fer.hr/ ---------------------------------------------------------------------- Copyright information: -Copyright (C) 1997-2024 Free Software Foundation, Inc. +Copyright (C) 1997-2024, 2026 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that diff --git a/README b/README index 3b7cc703a..19feee890 100644 --- a/README +++ b/README @@ -63,7 +63,7 @@ the file AUTHORS for a list of major contributors, and the ChangeLogs for a detailed listing of all contributions. -Copyright (C) 1995-2024 Free Software Foundation, Inc. +Copyright (C) 1995-2024, 2026 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/README.checkout b/README.checkout index e16f92af0..83fa6c3e9 100644 --- a/README.checkout +++ b/README.checkout @@ -161,7 +161,7 @@ Testing and development that bug, which might be tedious. Tests should only be run through GDB for that purpose. - Copyright (C) 2008, 2010, 2014-2015, 2018-2024 Free Software + Copyright (C) 2008, 2010, 2014-2015, 2018-2024, 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . diff --git a/bootstrap.conf b/bootstrap.conf index b868e7b14..b02c6daf0 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -1,5 +1,6 @@ # bootstrap.conf - Bootstrap configuration. -# Copyright (C) 2007-2012, 2018-2024 Free Software Foundation, Inc. +# Copyright (C) 2007-2012, 2018-2024, 2026 Free Software Foundation, +# Inc. # # This file is part of GNU Wget. # diff --git a/build-aux/build_info.pl b/build-aux/build_info.pl index 9f9b3304c..086af1f66 100755 --- a/build-aux/build_info.pl +++ b/build-aux/build_info.pl @@ -2,7 +2,8 @@ # Generate build_info.c. -# Copyright (C) 2009-2011, 2018-2024 Free Software Foundation, Inc. +# Copyright (C) 2009-2011, 2018-2024, 2026 Free Software Foundation, +# Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -132,8 +133,7 @@ sub output_code /* This stores global variables that are initialized with preprocessor declarations for output with the --version flag. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. */ + Copyright (C) 1996-2009, 2026 Free Software Foundation, Inc. */ #include "wget.h" #include diff --git a/configure.ac b/configure.ac index 996c70d8f..5f6a7286c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Template file for GNU Autoconf -dnl Copyright (C) 1995-1997, 2001, 2007-2014, 2018-2024 Free Software -dnl Foundation, Inc. +dnl Copyright (C) 1995-1997, 2001, 2007-2014, 2018-2024, 2026 Free +dnl Software Foundation, Inc. dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by diff --git a/contrib/commit-check b/contrib/commit-check index 82c39649f..3024abc70 100755 --- a/contrib/commit-check +++ b/contrib/commit-check @@ -1,6 +1,6 @@ #!/usr/bin/env sh -# Copyright (c) 2018-2022, 2024 Free Software Foundation, Inc. +# Copyright (c) 2018-2022, 2024, 2026 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/doc/Makefile.am b/doc/Makefile.am index 6133c5c53..606ec8e41 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ # Makefile for `wget' utility -# Copyright (C) 1995-1997, 2007-2011, 2015, 2018-2024 Free Software -# Foundation, Inc. +# Copyright (C) 1995-1997, 2007-2011, 2015, 2018-2024, 2026 Free +# Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/doc/fdl.texi b/doc/fdl.texi index d151a6a6a..9afbc31a5 100644 --- a/doc/fdl.texi +++ b/doc/fdl.texi @@ -5,8 +5,8 @@ @c hence no sectioning command or @node. @display -Copyright @copyright{} 2000--2002, 2007--2008, 2015, 2018--2024 Free -Software Foundation, Inc. +Copyright @copyright{} 2000--2002, 2007--2008, 2015, 2018--2024, 2026 +Free Software Foundation, Inc. @uref{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl index 9325edb20..5d7144890 100755 --- a/doc/texi2pod.pl +++ b/doc/texi2pod.pl @@ -1,7 +1,7 @@ #! /usr/bin/env perl -# Copyright (C) 1999-2001, 2003, 2007, 2009-2011, 2015, 2018-2024 Free -# Software Foundation, Inc. +# Copyright (C) 1999-2001, 2003, 2007, 2009-2011, 2015, 2018-2024, +# 2026 Free Software Foundation, Inc. # This file is part of GCC. diff --git a/doc/wget.texi b/doc/wget.texi index ab4ff1dcf..0689c177b 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -31,7 +31,7 @@ This file documents the GNU Wget utility for downloading network data. @c man begin COPYRIGHT -Copyright @copyright{} 1996--2011, 2015, 2018--2024 Free Software +Copyright @copyright{} 1996--2011, 2015, 2018--2024, 2026 Free Software Foundation, Inc. @iftex diff --git a/fuzz/fuzzer.h b/fuzz/fuzzer.h index cae9726f9..b13037ed0 100644 --- a/fuzz/fuzzer.h +++ b/fuzz/fuzzer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/glob_crash.c b/fuzz/glob_crash.c index c165bdb30..60b2c115a 100644 --- a/fuzz/glob_crash.c +++ b/fuzz/glob_crash.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/main.c b/fuzz/main.c index 4f240bf66..c8df7d9f5 100644 --- a/fuzz/main.c +++ b/fuzz/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/run-afl.sh b/fuzz/run-afl.sh index 4db40a6a1..6916138fd 100755 --- a/fuzz/run-afl.sh +++ b/fuzz/run-afl.sh @@ -1,6 +1,6 @@ #!/bin/sh -eu -# Copyright (c) 2017, 2019-2024 Free Software Foundation, Inc. +# Copyright (c) 2017, 2019-2024, 2026 Free Software Foundation, Inc. # # This file is part of GNU Wget. # diff --git a/fuzz/run-clang.sh b/fuzz/run-clang.sh index 09154090a..f9a126197 100755 --- a/fuzz/run-clang.sh +++ b/fuzz/run-clang.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # -# Copyright (c) 2017, 2019-2024 Free Software Foundation, Inc. +# Copyright (c) 2017, 2019-2024, 2026 Free Software Foundation, Inc. # # This file is part of GNU Wget. # diff --git a/fuzz/wget_cookie_fuzzer.c b/fuzz/wget_cookie_fuzzer.c index 9fc3e6d51..e2a6d3c04 100644 --- a/fuzz/wget_cookie_fuzzer.c +++ b/fuzz/wget_cookie_fuzzer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_css_fuzzer.c b/fuzz/wget_css_fuzzer.c index 46f37c4db..3bd8dd77b 100644 --- a/fuzz/wget_css_fuzzer.c +++ b/fuzz/wget_css_fuzzer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_ftpls_fuzzer.c b/fuzz/wget_ftpls_fuzzer.c index dcc69e62f..9ec1484d1 100644 --- a/fuzz/wget_ftpls_fuzzer.c +++ b/fuzz/wget_ftpls_fuzzer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_html_fuzzer.c b/fuzz/wget_html_fuzzer.c index 0f321f2b3..e7121ad8e 100644 --- a/fuzz/wget_html_fuzzer.c +++ b/fuzz/wget_html_fuzzer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_netrc_fuzzer.c b/fuzz/wget_netrc_fuzzer.c index 1baf81651..5faefb80b 100644 --- a/fuzz/wget_netrc_fuzzer.c +++ b/fuzz/wget_netrc_fuzzer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_ntlm_fuzzer.c b/fuzz/wget_ntlm_fuzzer.c index ef01e4e74..5f38a2585 100644 --- a/fuzz/wget_ntlm_fuzzer.c +++ b/fuzz/wget_ntlm_fuzzer.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2017-2019, 2021-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2019, 2021-2024, 2026 Free Software Foundation, + * Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_options_fuzzer.c b/fuzz/wget_options_fuzzer.c index 78974d06b..792a0a286 100644 --- a/fuzz/wget_options_fuzzer.c +++ b/fuzz/wget_options_fuzzer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_progress_fuzzer.c b/fuzz/wget_progress_fuzzer.c index d01cad65d..5148f4aa8 100644 --- a/fuzz/wget_progress_fuzzer.c +++ b/fuzz/wget_progress_fuzzer.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2017-2019, 2021-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2019, 2021-2024, 2026 Free Software Foundation, + * Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_read_hunk_fuzzer.c b/fuzz/wget_read_hunk_fuzzer.c index 4315925dc..1dfbc3bed 100644 --- a/fuzz/wget_read_hunk_fuzzer.c +++ b/fuzz/wget_read_hunk_fuzzer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2024 Free Software Foundation, Inc. + * Copyright (c) 2019-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_robots_fuzzer.c b/fuzz/wget_robots_fuzzer.c index 24dd4cf3d..ae0e651bb 100644 --- a/fuzz/wget_robots_fuzzer.c +++ b/fuzz/wget_robots_fuzzer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/fuzz/wget_url_fuzzer.c b/fuzz/wget_url_fuzzer.c index d6eb42c48..e20f270cb 100644 --- a/fuzz/wget_url_fuzzer.c +++ b/fuzz/wget_url_fuzzer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2024 Free Software Foundation, Inc. + * Copyright (c) 2017-2024, 2026 Free Software Foundation, Inc. * * This file is part of GNU Wget. * diff --git a/m4/wget.m4 b/m4/wget.m4 index 03b390b08..66c41f089 100644 --- a/m4/wget.m4 +++ b/m4/wget.m4 @@ -1,5 +1,6 @@ dnl Wget-specific Autoconf macros. -dnl Copyright (C) 1995-2011, 2018-2024 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2011, 2018-2024, 2026 Free Software Foundation, +dnl Inc. dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by diff --git a/m4/wget_manywarnings.m4 b/m4/wget_manywarnings.m4 index 9a2390d06..7ddebd1c4 100644 --- a/m4/wget_manywarnings.m4 +++ b/m4/wget_manywarnings.m4 @@ -1,5 +1,5 @@ # wget_manywarnings.m4 serial 1 -dnl Copyright (C) 2016-2024 Free Software Foundation, Inc. +dnl Copyright (C) 2016-2024, 2026 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/po/POTFILES.in b/po/POTFILES.in index 41cbcc618..352b58de8 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,5 +1,6 @@ # List of files which containing translatable strings. -# Copyright (C) 1995-2011, 2018-2024 Free Software Foundation, Inc. +# Copyright (C) 1995-2011, 2018-2024, 2026 Free Software Foundation, +# Inc. # Package source files src/connect.c diff --git a/src/Makefile.am b/src/Makefile.am index 86be5330b..9fd7d9a00 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ # Makefile for `wget' utility -# Copyright (C) 1995-2011, 2015, 2018-2024 Free Software Foundation, -# Inc. +# Copyright (C) 1995-2011, 2015, 2018-2024, 2026 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/connect.c b/src/connect.c index d00482ffc..9365e5197 100644 --- a/src/connect.c +++ b/src/connect.c @@ -1,6 +1,6 @@ /* Establishing and handling network connections. - Copyright (C) 1995-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1995-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/connect.h b/src/connect.h index a48752d27..5a446a2d1 100644 --- a/src/connect.h +++ b/src/connect.h @@ -1,6 +1,6 @@ /* Declarations for connect. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/convert.c b/src/convert.c index 2e5bc22b0..feb90a35d 100644 --- a/src/convert.c +++ b/src/convert.c @@ -1,5 +1,5 @@ /* Conversion of links to local files. - Copyright (C) 2003-2011, 2014-2015, 2018-2024 Free Software + Copyright (C) 2003-2011, 2014-2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/convert.h b/src/convert.h index 47f8e9536..c9d2f5c23 100644 --- a/src/convert.h +++ b/src/convert.h @@ -1,6 +1,6 @@ /* Declarations for convert.c - Copyright (C) 2003-2006, 2009-2011, 2015, 2018-2024 Free Software - Foundation, Inc. + Copyright (C) 2003-2006, 2009-2011, 2015, 2018-2024, 2026 Free + Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/cookies.c b/src/cookies.c index f551ac8af..370c04539 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -1,6 +1,6 @@ /* Support for cookies. - Copyright (C) 2001-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2001-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/cookies.h b/src/cookies.h index ce8fea3f7..a37ede507 100644 --- a/src/cookies.h +++ b/src/cookies.h @@ -1,6 +1,6 @@ /* Support for cookies. - Copyright (C) 2001-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2001-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/css-tokens.h b/src/css-tokens.h index 56f302536..13dfcc287 100644 --- a/src/css-tokens.h +++ b/src/css-tokens.h @@ -1,5 +1,5 @@ /* Declarations for css.lex - Copyright (C) 2006, 2009-2011, 2015, 2018-2024 Free Software + Copyright (C) 2006, 2009-2011, 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/css-url.c b/src/css-url.c index 78fc0dd26..ae318b70f 100644 --- a/src/css-url.c +++ b/src/css-url.c @@ -1,6 +1,6 @@ /* Collect URLs from CSS source. - Copyright (C) 1998, 2000-2003, 2009-2011, 2014-2015, 2018-2024 Free - Software Foundation, Inc. + Copyright (C) 1998, 2000-2003, 2009-2011, 2014-2015, 2018-2024, 2026 + Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/css-url.h b/src/css-url.h index bfa4c3105..8972c38c4 100644 --- a/src/css-url.h +++ b/src/css-url.h @@ -1,5 +1,5 @@ /* Declarations for css-url.c. - Copyright (C) 2006, 2009-2011, 2015, 2018-2024 Free Software + Copyright (C) 2006, 2009-2011, 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/css.l b/src/css.l index cf6bc2950..852506cca 100644 --- a/src/css.l +++ b/src/css.l @@ -12,7 +12,7 @@ %{ /* Lex source for CSS tokenizing. Taken from http://www.w3.org/TR/CSS21/grammar.html#q2 - Copyright (C) 2006, 2009-2011, 2015, 2018-2024 Free Software + Copyright (C) 2006, 2009-2011, 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/exits.c b/src/exits.c index 4e7182590..fbcf5d2e5 100644 --- a/src/exits.c +++ b/src/exits.c @@ -1,6 +1,6 @@ /* Exit status handling. - Copyright (C) 2009-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2009-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/exits.h b/src/exits.h index fa5145c6b..1097767bf 100644 --- a/src/exits.h +++ b/src/exits.h @@ -1,6 +1,6 @@ /* Exit status related declarations. - Copyright (C) 2009-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2009-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/ftp-basic.c b/src/ftp-basic.c index 8f7d19c16..4870256a2 100644 --- a/src/ftp-basic.c +++ b/src/ftp-basic.c @@ -1,5 +1,5 @@ /* Basic FTP routines. - Copyright (C) 1996-2011, 2014-2015, 2018-2024 Free Software + Copyright (C) 1996-2011, 2014-2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/ftp-ls.c b/src/ftp-ls.c index 7a18584ff..e4175f8ec 100644 --- a/src/ftp-ls.c +++ b/src/ftp-ls.c @@ -1,6 +1,6 @@ /* Parsing FTP `ls' output. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/ftp-opie.c b/src/ftp-opie.c index 47ad0ddd1..4619e566f 100644 --- a/src/ftp-opie.c +++ b/src/ftp-opie.c @@ -1,6 +1,6 @@ /* Opie (s/key) support for FTP. - Copyright (C) 1998-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1998-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/ftp.c b/src/ftp.c index 3ffbb2d0b..4235888ed 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -1,5 +1,5 @@ /* File Transfer Protocol support. - Copyright (C) 1996-2011, 2014-2015, 2018-2024 Free Software + Copyright (C) 1996-2011, 2014-2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/ftp.h b/src/ftp.h index 21ed5c062..a6ada2b4d 100644 --- a/src/ftp.h +++ b/src/ftp.h @@ -1,6 +1,6 @@ /* Declarations for FTP support. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/gnutls.c b/src/gnutls.c index cfcdf671d..fe049a503 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -1,6 +1,6 @@ /* SSL support via GnuTLS library. - Copyright (C) 2005-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2005-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/hash.c b/src/hash.c index 4f88e4a1d..25b4d0fea 100644 --- a/src/hash.c +++ b/src/hash.c @@ -1,6 +1,6 @@ /* Hash tables. - Copyright (C) 2000-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2000-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/hash.h b/src/hash.h index da6dd1ab9..d8fe9631e 100644 --- a/src/hash.h +++ b/src/hash.h @@ -1,5 +1,5 @@ /* Hash table declarations. - Copyright (C) 2000, 2007-2011, 2015, 2018-2024 Free Software + Copyright (C) 2000, 2007-2011, 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/host.c b/src/host.c index 76527a6be..499bc06db 100644 --- a/src/host.c +++ b/src/host.c @@ -1,6 +1,6 @@ /* Host name resolution and matching. - Copyright (C) 1996-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/host.h b/src/host.h index f07f5177d..35cbb342b 100644 --- a/src/host.h +++ b/src/host.h @@ -1,6 +1,6 @@ /* Declarations for host.c - Copyright (C) 1996-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/hsts.c b/src/hsts.c index e00bb1b91..a7d20a2a3 100644 --- a/src/hsts.c +++ b/src/hsts.c @@ -1,6 +1,6 @@ /* HTTP Strict Transport Security (HSTS) support. - Copyright (C) 1996-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/hsts.h b/src/hsts.h index cdeb3080e..550eac3cd 100644 --- a/src/hsts.h +++ b/src/hsts.h @@ -1,6 +1,6 @@ /* Declarations for hsts.c - Copyright (C) 1996-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/html-parse.c b/src/html-parse.c index d724384d3..65eccaaa9 100644 --- a/src/html-parse.c +++ b/src/html-parse.c @@ -1,6 +1,6 @@ /* HTML parser for Wget. - Copyright (C) 1998-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1998-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/html-parse.h b/src/html-parse.h index 54501838c..236e180ce 100644 --- a/src/html-parse.h +++ b/src/html-parse.h @@ -1,6 +1,6 @@ /* Declarations for html-parse.c. - Copyright (C) 1998-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1998-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/html-url.c b/src/html-url.c index 99914943c..9229d9460 100644 --- a/src/html-url.c +++ b/src/html-url.c @@ -1,6 +1,6 @@ /* Collect URLs from HTML source. - Copyright (C) 1998-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1998-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/html-url.h b/src/html-url.h index cf80e43d7..552ea9a91 100644 --- a/src/html-url.h +++ b/src/html-url.h @@ -1,6 +1,6 @@ /* Declarations for html-url.c. - Copyright (C) 1995-1997, 2009-2011, 2015, 2018-2024 Free Software - Foundation, Inc. + Copyright (C) 1995-1997, 2009-2011, 2015, 2018-2024, 2026 Free + Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/http-ntlm.c b/src/http-ntlm.c index ee054e0b2..df9603b0d 100644 --- a/src/http-ntlm.c +++ b/src/http-ntlm.c @@ -1,6 +1,6 @@ /* NTLM code. - Copyright (C) 2005-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2005-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. Contributed by Daniel Stenberg. This file is part of GNU Wget. diff --git a/src/http-ntlm.h b/src/http-ntlm.h index 58e67fc8b..5b47bac0c 100644 --- a/src/http-ntlm.h +++ b/src/http-ntlm.h @@ -1,7 +1,7 @@ #ifndef __HTTP_NTLM_H #define __HTTP_NTLM_H /* Declarations for http_ntlm.c - Copyright (C) 1995-1997, 2000, 2007-2011, 2015, 2018-2024 Free + Copyright (C) 1995-1997, 2000, 2007-2011, 2015, 2018-2024, 2026 Free Software Foundation, Inc. Contributed by Daniel Stenberg. diff --git a/src/http.c b/src/http.c index 07af1867d..570b72a72 100644 --- a/src/http.c +++ b/src/http.c @@ -1,5 +1,5 @@ /* HTTP support. - Copyright (C) 1996-2012, 2014-2015, 2018-2024 Free Software + Copyright (C) 1996-2012, 2014-2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/http.h b/src/http.h index 570f76837..2856230dd 100644 --- a/src/http.h +++ b/src/http.h @@ -1,6 +1,6 @@ /* Declarations for HTTP. - Copyright (C) 2005-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2005-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/init.c b/src/init.c index 1c4528360..c8c4bd86f 100644 --- a/src/init.c +++ b/src/init.c @@ -1,5 +1,5 @@ /* Reading/parsing the initialization file. - Copyright (C) 1996-2012, 2014-2015, 2018-2024 Free Software + Copyright (C) 1996-2012, 2014-2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/init.h b/src/init.h index d8857a06b..76c555ca0 100644 --- a/src/init.h +++ b/src/init.h @@ -1,6 +1,6 @@ /* Declarations for init.c. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/iri.c b/src/iri.c index 351357daa..3a3306f1e 100644 --- a/src/iri.c +++ b/src/iri.c @@ -1,6 +1,6 @@ /* IRI related functions. - Copyright (C) 2008-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2008-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/iri.h b/src/iri.h index 2f033105c..5d3961c1e 100644 --- a/src/iri.h +++ b/src/iri.h @@ -1,6 +1,6 @@ /* Internationalization related declarations. - Copyright (C) 2008-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2008-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/log.c b/src/log.c index c0451a2cb..fe8c3982c 100644 --- a/src/log.c +++ b/src/log.c @@ -1,6 +1,6 @@ /* Messages logging. - Copyright (C) 1998-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1998-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/log.h b/src/log.h index 74b943923..679b83db9 100644 --- a/src/log.h +++ b/src/log.h @@ -1,6 +1,6 @@ /* Declarations for log.c. - Copyright (C) 1998-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1998-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/main.c b/src/main.c index ebe975f7e..76dc65817 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,6 @@ /* Command line parsing. - Copyright (C) 1996-2015, 2018-2024 Free Software Foundation, Inc. + Copyright (C) 1996-2015, 2018-2024, 2026 Free Software Foundation, + Inc. This file is part of GNU Wget. diff --git a/src/metalink.c b/src/metalink.c index de2439c90..9e355fd09 100644 --- a/src/metalink.c +++ b/src/metalink.c @@ -1,5 +1,5 @@ /* Metalink module. - Copyright (C) 2015, 2018-2024 Free Software Foundation, Inc. + Copyright (C) 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/metalink.h b/src/metalink.h index bd8b99c9a..28659c71b 100644 --- a/src/metalink.h +++ b/src/metalink.h @@ -1,5 +1,5 @@ /* Declarations for metalink.c. - Copyright (C) 2015, 2018-2024 Free Software Foundation, Inc. + Copyright (C) 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/mswindows.c b/src/mswindows.c index 03feea9a9..95d389ca2 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -1,5 +1,5 @@ /* mswindows.c -- Windows-specific support - Copyright (C) 1996-2011, 2014-2015, 2018-2024 Free Software + Copyright (C) 1996-2011, 2014-2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/mswindows.h b/src/mswindows.h index 8c1a19af3..39853820b 100644 --- a/src/mswindows.h +++ b/src/mswindows.h @@ -1,6 +1,6 @@ /* Declarations for windows - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/netrc.c b/src/netrc.c index 285f595c4..343c174a3 100644 --- a/src/netrc.c +++ b/src/netrc.c @@ -1,5 +1,5 @@ /* Read and parse the .netrc file to get hosts, accounts, and passwords. - Copyright (C) 1996, 2007-2011, 2015, 2018-2024 Free Software + Copyright (C) 1996, 2007-2011, 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/netrc.h b/src/netrc.h index b7fc1b372..658aa5788 100644 --- a/src/netrc.h +++ b/src/netrc.h @@ -1,5 +1,5 @@ /* Declarations for netrc.c - Copyright (C) 1996, 1996-1997, 2007-2011, 2015, 2018-2024 Free + Copyright (C) 1996, 1996-1997, 2007-2011, 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/openssl.c b/src/openssl.c index a97087530..0e16373f8 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -1,6 +1,6 @@ /* SSL support via OpenSSL library. - Copyright (C) 2000-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2000-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. Originally contributed by Christian Fraenkel. This file is part of GNU Wget. diff --git a/src/options.h b/src/options.h index 78fbceb01..8deee02c0 100644 --- a/src/options.h +++ b/src/options.h @@ -1,6 +1,6 @@ /* struct options. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/progress.c b/src/progress.c index 4ea30f425..863d0e26b 100644 --- a/src/progress.c +++ b/src/progress.c @@ -1,6 +1,6 @@ /* Download progress. - Copyright (C) 2001-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2001-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/progress.h b/src/progress.h index 5b69cd5de..1cefa5e1e 100644 --- a/src/progress.h +++ b/src/progress.h @@ -1,6 +1,6 @@ /* Download progress. - Copyright (C) 2001-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2001-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/ptimer.c b/src/ptimer.c index 0e6888153..1ae7fd947 100644 --- a/src/ptimer.c +++ b/src/ptimer.c @@ -1,6 +1,6 @@ /* Portable timers. - Copyright (C) 2005-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2005-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/ptimer.h b/src/ptimer.h index 288bd0cb7..a9e300368 100644 --- a/src/ptimer.h +++ b/src/ptimer.h @@ -1,6 +1,6 @@ /* Declarations for ptimer.c. - Copyright (C) 2005-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2005-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/recur.c b/src/recur.c index ba35f56db..ba9e01dd5 100644 --- a/src/recur.c +++ b/src/recur.c @@ -1,6 +1,6 @@ /* Handling of recursive HTTP retrieving. - Copyright (C) 1996-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/recur.h b/src/recur.h index e5a3a8421..c2b082d48 100644 --- a/src/recur.h +++ b/src/recur.h @@ -1,6 +1,6 @@ /* Declarations for recur.c. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/res.c b/src/res.c index 7131ca876..b7b130bee 100644 --- a/src/res.c +++ b/src/res.c @@ -1,5 +1,5 @@ /* Support for Robot Exclusion Standard (RES). - Copyright (C) 2001, 2006-2011, 2015, 2018-2024 Free Software + Copyright (C) 2001, 2006-2011, 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of Wget. diff --git a/src/res.h b/src/res.h index 9f7fafa0a..4b07b3c56 100644 --- a/src/res.h +++ b/src/res.h @@ -1,5 +1,5 @@ /* Declarations for res.c. - Copyright (C) 2001, 2007-2011, 2015, 2018-2024 Free Software + Copyright (C) 2001, 2007-2011, 2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of Wget. diff --git a/src/retr.c b/src/retr.c index 26eb9f172..b2212efa4 100644 --- a/src/retr.c +++ b/src/retr.c @@ -1,5 +1,5 @@ /* File retrieval. - Copyright (C) 1996-2011, 2014-2015, 2018-2024 Free Software + Copyright (C) 1996-2011, 2014-2015, 2018-2024, 2026 Free Software Foundation, Inc. This file is part of GNU Wget. diff --git a/src/retr.h b/src/retr.h index 9509f5edf..47778c1a1 100644 --- a/src/retr.h +++ b/src/retr.h @@ -1,6 +1,6 @@ /* Declarations for retr.c. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/spider.c b/src/spider.c index 95709d152..e31a5066a 100644 --- a/src/spider.c +++ b/src/spider.c @@ -1,6 +1,6 @@ /* Keep track of visited URLs in spider mode. - Copyright (C) 2006-2011, 2015, 2019-2024 Free Software Foundation, - Inc. + Copyright (C) 2006-2011, 2015, 2019-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/spider.h b/src/spider.h index 4626ccd27..49a09b086 100644 --- a/src/spider.h +++ b/src/spider.h @@ -1,6 +1,6 @@ /* Declarations for spider.c - Copyright (C) 2006-2011, 2015, 2019-2024 Free Software Foundation, - Inc. + Copyright (C) 2006-2011, 2015, 2019-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/ssl.h b/src/ssl.h index c2d760afa..14f52f0c4 100644 --- a/src/ssl.h +++ b/src/ssl.h @@ -1,6 +1,6 @@ /* SSL support. - Copyright (C) 2000-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2000-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. Originally contributed by Christian Fraenkel. This file is part of GNU Wget. diff --git a/src/sysdep.h b/src/sysdep.h index fe59f7f90..adabd7ed8 100644 --- a/src/sysdep.h +++ b/src/sysdep.h @@ -1,6 +1,6 @@ /* Dirty system-dependent hacks. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/url.c b/src/url.c index 913db4f19..c7801769c 100644 --- a/src/url.c +++ b/src/url.c @@ -1,6 +1,6 @@ /* URL handling. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/url.h b/src/url.h index 7796a21cd..ba220ab15 100644 --- a/src/url.h +++ b/src/url.h @@ -1,6 +1,6 @@ /* Declarations for url.c. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/utils.c b/src/utils.c index 2511a25fa..b70fa54c5 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,6 +1,6 @@ /* Various utility functions. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/utils.h b/src/utils.h index eb91ef2b1..f3cc8f7b9 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,6 +1,6 @@ /* Declarations for utils.c. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/version.h b/src/version.h index 5a84474de..c16f089fc 100644 --- a/src/version.h +++ b/src/version.h @@ -1,5 +1,6 @@ /* Extern declarations for printing version information - Copyright (C) 2013, 2015, 2018-2024 Free Software Foundation, Inc. + Copyright (C) 2013, 2015, 2018-2024, 2026 Free Software Foundation, + Inc. This file is part of GNU Wget. diff --git a/src/warc.c b/src/warc.c index 230bd36ff..fa9a92c76 100644 --- a/src/warc.c +++ b/src/warc.c @@ -1,6 +1,6 @@ /* Utility functions for writing WARC files. - Copyright (C) 2011-2012, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2011-2012, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/wget.h b/src/wget.h index 47fcb6db0..92b63e60e 100644 --- a/src/wget.h +++ b/src/wget.h @@ -1,6 +1,6 @@ /* Miscellaneous declarations. - Copyright (C) 1996-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 1996-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/src/xattr.c b/src/xattr.c index 0a7ff8248..d25de5aac 100644 --- a/src/xattr.c +++ b/src/xattr.c @@ -1,6 +1,6 @@ /* xattr.h -- POSIX Extended Attribute support. - Copyright (C) 2016, 2018-2024 Free Software Foundation, Inc. + Copyright (C) 2016, 2018-2024, 2026 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/xattr.h b/src/xattr.h index 0ed873d6a..814dcae33 100644 --- a/src/xattr.h +++ b/src/xattr.h @@ -1,6 +1,6 @@ /* xattr.h -- POSIX Extended Attribute function mappings. - Copyright (C) 2016, 2018-2024 Free Software Foundation, Inc. + Copyright (C) 2016, 2018-2024, 2026 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/testenv/Makefile.am b/testenv/Makefile.am index a592e9087..a2e96ddc9 100644 --- a/testenv/Makefile.am +++ b/testenv/Makefile.am @@ -1,5 +1,6 @@ # Makefile for `wget' utility -# Copyright (C) 2013, 2015, 2018-2024 Free Software Foundation, Inc. +# Copyright (C) 2013, 2015, 2018-2024, 2026 Free Software Foundation, +# Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/Makefile.am b/tests/Makefile.am index f9ee54e4c..a05778761 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ # Makefile for `wget' utility -# Copyright (C) 1995-2011, 2015, 2018-2024 Free Software Foundation, -# Inc. +# Copyright (C) 1995-2011, 2015, 2018-2024, 2026 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/tests/unit-tests.c b/tests/unit-tests.c index 28b9328ab..e9695e981 100644 --- a/tests/unit-tests.c +++ b/tests/unit-tests.c @@ -1,6 +1,6 @@ /* Unit testing. - Copyright (C) 2005-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2005-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/tests/unit-tests.h b/tests/unit-tests.h index 44635f0cd..4402c0173 100644 --- a/tests/unit-tests.h +++ b/tests/unit-tests.h @@ -1,6 +1,6 @@ /* Unit testing declarations. - Copyright (C) 2005-2011, 2015, 2018-2024 Free Software Foundation, - Inc. + Copyright (C) 2005-2011, 2015, 2018-2024, 2026 Free Software + Foundation, Inc. This file is part of GNU Wget. diff --git a/util/Makefile.am b/util/Makefile.am index f40cee2b2..b2d2687f8 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -1,6 +1,6 @@ # Makefile for `wget' utility -# Copyright (C) 1995-1997, 2007-2011, 2015, 2018-2024 Free Software -# Foundation, Inc. +# Copyright (C) 1995-1997, 2007-2011, 2015, 2018-2024, 2026 Free +# Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/util/paramcheck.pl b/util/paramcheck.pl index d6839a53c..81e50ee95 100755 --- a/util/paramcheck.pl +++ b/util/paramcheck.pl @@ -1,7 +1,7 @@ #!/usr/bin/env perl -# Copyright (C) 2008-2011, 2015, 2018-2024 Free Software Foundation, -# Inc. +# Copyright (C) 2008-2011, 2015, 2018-2024, 2026 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/util/rmold.pl b/util/rmold.pl index eb61fda35..87f69a3fa 100755 --- a/util/rmold.pl +++ b/util/rmold.pl @@ -1,7 +1,7 @@ #!/usr/bin/env perl -w -# Copyright (C) 1995-1997, 2007-2011, 2015, 2018-2024 Free Software -# Foundation, Inc. +# Copyright (C) 1995-1997, 2007-2011, 2015, 2018-2024, 2026 Free +# Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From 0c0bfeb17ac3fd2705d34fc843613c873f7cfd3b Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Tue, 3 Feb 2026 22:03:27 +0100 Subject: [PATCH 33/36] changes --- cfg.mk | 2 -- doc/wget.texi | 8 ++++---- src/main.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cfg.mk b/cfg.mk index e250cd979..1ceb0fa2b 100644 --- a/cfg.mk +++ b/cfg.mk @@ -10,9 +10,7 @@ export VC_LIST_EXCEPT_DEFAULT=^(lib/.*|m4/.*|md5/.*|build-aux/.*|src/gettext\.h| config_h_header = "wget\.h" local-checks-to-skip = \ - sc_const_long_option \ sc_error_message_uppercase \ - sc_two_space_separator_in_usage \ sc_useless_cpp_parens \ \ sc_prohibit_atoi_atof \ diff --git a/doc/wget.texi b/doc/wget.texi index 0689c177b..8d6d7e20f 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -1677,12 +1677,12 @@ users: @example @group # @r{Log in to the server. This can be done only once.} -wget --save-cookies cookies.txt \ - --post-data 'user=foo&password=bar' \ +wget --save-cookies cookies.txt \ + --post-data 'user=foo&password=bar' \ http://example.com/auth.php # @r{Now grab the page or pages we care about.} -wget --load-cookies cookies.txt \ +wget --load-cookies cookies.txt \ -p http://example.com/interesting/article.php @end group @end example @@ -3985,7 +3985,7 @@ or @samp{application/xhtml+xml} to @file{@var{name}.html}. @example wget --mirror --convert-links --backup-converted \ - --adjust-extension -o /home/me/weeklog \ + --adjust-extension -o /home/me/weeklog \ https://www.gnu.org/ @end example diff --git a/src/main.c b/src/main.c index 76dc65817..21d631e6b 100644 --- a/src/main.c +++ b/src/main.c @@ -488,7 +488,7 @@ no_prefix (const char *s) } /* The arguments that that main passes to getopt_long. */ -static struct option long_options[2 * countof (option_data) + 1]; +static const struct option long_options[2 * countof (option_data) + 1]; static char short_options[128]; /* Mapping between short option chars and option_data indices. */ From 7ae78ab856615f22a4dfd32bcd3a0c211c602670 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Tue, 10 Feb 2026 17:58:52 +0100 Subject: [PATCH 34/36] cfg.mk: Disable the codespell check The new sc_codespell check introduces a lot of false positives. Until we can clean it up, it is better to disable it and allow our CI pipelines to work. --- cfg.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index 1ceb0fa2b..784843148 100644 --- a/cfg.mk +++ b/cfg.mk @@ -20,7 +20,8 @@ local-checks-to-skip = \ sc_cast_of_argument_to_free \ sc_prohibit_gnu_make_extensions \ \ - sc_indent + sc_indent \ + sc_codespell #SHELL=bash -x show-vc-list-except: From e514d54dfc540644f33c32ed96dc29f0cf0984a3 Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Tue, 10 Feb 2026 18:26:42 +0100 Subject: [PATCH 35/36] Revert "changes" This reverts commit 0c0bfeb17ac3fd2705d34fc843613c873f7cfd3b. That was a local, untested change that should never have been pushed. But I messed up, and pushed it when making another change to unblock the pipelines. Teaches you to never work on master. --- cfg.mk | 2 ++ doc/wget.texi | 8 ++++---- src/main.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cfg.mk b/cfg.mk index 784843148..2fd5fb1c9 100644 --- a/cfg.mk +++ b/cfg.mk @@ -10,7 +10,9 @@ export VC_LIST_EXCEPT_DEFAULT=^(lib/.*|m4/.*|md5/.*|build-aux/.*|src/gettext\.h| config_h_header = "wget\.h" local-checks-to-skip = \ + sc_const_long_option \ sc_error_message_uppercase \ + sc_two_space_separator_in_usage \ sc_useless_cpp_parens \ \ sc_prohibit_atoi_atof \ diff --git a/doc/wget.texi b/doc/wget.texi index 8d6d7e20f..0689c177b 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -1677,12 +1677,12 @@ users: @example @group # @r{Log in to the server. This can be done only once.} -wget --save-cookies cookies.txt \ - --post-data 'user=foo&password=bar' \ +wget --save-cookies cookies.txt \ + --post-data 'user=foo&password=bar' \ http://example.com/auth.php # @r{Now grab the page or pages we care about.} -wget --load-cookies cookies.txt \ +wget --load-cookies cookies.txt \ -p http://example.com/interesting/article.php @end group @end example @@ -3985,7 +3985,7 @@ or @samp{application/xhtml+xml} to @file{@var{name}.html}. @example wget --mirror --convert-links --backup-converted \ - --adjust-extension -o /home/me/weeklog \ + --adjust-extension -o /home/me/weeklog \ https://www.gnu.org/ @end example diff --git a/src/main.c b/src/main.c index 21d631e6b..76dc65817 100644 --- a/src/main.c +++ b/src/main.c @@ -488,7 +488,7 @@ no_prefix (const char *s) } /* The arguments that that main passes to getopt_long. */ -static const struct option long_options[2 * countof (option_data) + 1]; +static struct option long_options[2 * countof (option_data) + 1]; static char short_options[128]; /* Mapping between short option chars and option_data indices. */ From b44f57e892acf95677ee0d2ee02f6c4ed200ead5 Mon Sep 17 00:00:00 2001 From: Cole Leavitt Date: Mon, 20 Apr 2026 07:33:47 -0700 Subject: [PATCH 36/36] ftp: add --ftp-recurse-symlink-dirs to descend into symlink directories When recursing over FTP, wget treats entries of type FT_SYMLINK by either creating a local symbolic link (--retr-symlinks=no) or trying to fetch the target as a plain file (--retr-symlinks, the default). Neither branch descends when the link's target is a directory on the server, so whole subtrees reachable only through server-side symlinks are silently skipped during --recursive retrieval. Introduce --ftp-recurse-symlink-dirs. When set together with --recursive, a symlink entry with a non-empty link target is reclassified as FT_DIRECTORY before the switch, so the existing ftp_retrieve_dirs()/ftp_retrieve_glob() path issues a CWD using the symlink's own name and the server resolves the target. No client-side type probe is needed. Cycle detection is implemented as a per-process string hash keyed by 'host:port:abs-path' where abs-path is the symlink target canonicalised against the current remote directory (relative targets resolved against u->dir, trailing slashes stripped). A target that has already been descended through is skipped with a LOG_VERBOSE diagnostic instead of recursing again, so circular link graphs terminate. The option defaults to off: a hostile FTP server could otherwise use crafted symlinks to amplify crawl cost or redirect descent out of the intended subtree. * src/options.h (struct options): Add ftp_recurse_symlink_dirs. * src/init.c (commands): Register 'ftprecursesymlinkdirs' as cmd_boolean. (defaults): Initialise ftp_recurse_symlink_dirs to false. * src/main.c (long_options): Add --ftp-recurse-symlink-dirs. (print_help): Document it in the FTP options block. * src/ftp.c: Include hash.h. (ftp_visited_symlinks): New static string hash table. (ftp_symlink_cycle_key, ftp_symlink_already_visited) (ftp_symlink_mark_visited): New helpers. (ftp_retrieve_list) : When opt.ftp_recurse_symlink_dirs && opt.recursive && f->linkto, consult the cycle cache, mark the target visited, and reclassify the entry as FT_DIRECTORY so ftp_retrieve_dirs descends it. * doc/wget.texi (FTP Options): Document the option and update the stale 'may be added in the future' note under --retr-symlinks. * NEWS: Mention the new option. --- NEWS | 4 +++ doc/wget.texi | 25 ++++++++++++++-- src/ftp.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/init.c | 6 ++++ src/main.c | 3 ++ src/options.h | 3 ++ 6 files changed, 122 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 28ebc27ff..094ace7e8 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ GNU Wget NEWS -- history of user-visible changes. * Noteworthy changes in release ?.? (????-??-??) [?] +** Add --ftp-recurse-symlink-dirs option to descend into FTP directory + symlinks during recursive retrieval. Cycle detection prevents + infinite loops from circular symlinks. + * Noteworthy changes in release 1.25.0 (2024-11-10) [stable] diff --git a/doc/wget.texi b/doc/wget.texi index 0689c177b..b33df8581 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -2142,8 +2142,8 @@ Preserve remote file permissions instead of permissions set by umask. @item --retr-symlinks By default, when retrieving @sc{ftp} directories recursively and a symbolic link is encountered, the symbolic link is traversed and the pointed-to files are -retrieved. Currently, Wget does not traverse symbolic links to directories to -download them recursively, though this feature may be added in the future. +retrieved. By default, Wget does not traverse symbolic links whose target is +a directory; see @samp{--ftp-recurse-symlink-dirs} to enable that. When @samp{--retr-symlinks=no} is specified, the linked-to file is not downloaded. Instead, a matching symbolic link is created on the local @@ -2157,6 +2157,27 @@ Note that when retrieving a file (not a directory) because it was specified on the command-line, rather than because it was recursed to, this option has no effect. Symbolic links are always traversed in this case. + +@cindex symbolic links, directories, recursion +@item --ftp-recurse-symlink-dirs +When retrieving @sc{ftp} directories recursively, descend through +symbolic links whose target is a directory on the server. Without this +option, symbolic links to directories are either materialized as local +symbolic links (when @samp{--retr-symlinks=no}) or retrieved as files +(the failure of which is silently ignored), and their contents are never +explored. + +Wget performs server-side descent: the symlink's name is used in a +@sc{cwd} command, and the server resolves the target. Cycles are +detected by canonicalizing each symlink's target path (relative targets +are resolved against the current remote directory) and tracking them in +a per-session set; a symlink whose target has already been descended +through is skipped with a diagnostic. + +This option is disabled by default because a malicious @sc{ftp} server +could craft a listing with symlinks that amplify recursion cost or +redirect descent outside the intended subtree. Combine with +@samp{--exclude-directories} and @samp{--level} to bound the crawl. @end table @section FTPS Options diff --git a/src/ftp.c b/src/ftp.c index 4235888ed..76a77eac8 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -40,6 +40,7 @@ as that of the covered work. */ #include #include "utils.h" +#include "hash.h" #include "url.h" #include "retr.h" #include "ftp.h" @@ -2194,6 +2195,69 @@ static uerr_t ftp_retrieve_dirs (struct url *, struct url *, static uerr_t ftp_retrieve_glob (struct url *, struct url *, ccon *, int); static struct fileinfo *delelement (struct fileinfo **, struct fileinfo **); +/* Cycle-detection table for --ftp-recurse-symlink-dirs. Keys are + heap-allocated "host:port:abs-path" strings owned by the table and + leaked at process exit. NULL until first symlink is visited. */ +static struct hash_table *ftp_visited_symlinks; + +/* Build a canonical cycle-detection key from the current URL and a + symlink target. Relative targets are resolved against u->dir; + absolute targets are used as-is. Trailing slashes are stripped so + "foo" and "foo/" collide. Caller frees. */ +static char * +ftp_symlink_cycle_key (const struct url *u, const char *linkto) +{ + char *abs; + char *key; + size_t plen; + + if (linkto[0] == '/') + abs = xstrdup (linkto); + else + { + const char *base = u->dir ? u->dir : ""; + size_t blen = strlen (base); + int need_sep = !(blen > 0 && base[blen - 1] == '/'); + abs = aprintf ("%s%s%s", base, need_sep ? "/" : "", linkto); + } + + plen = strlen (abs); + while (plen > 1 && abs[plen - 1] == '/') + abs[--plen] = '\0'; + + key = aprintf ("%s:%d:%s", u->host ? u->host : "", u->port, abs); + xfree (abs); + return key; +} + +static bool +ftp_symlink_already_visited (const struct url *u, const char *linkto) +{ + char *key; + bool seen; + + if (!ftp_visited_symlinks) + return false; + key = ftp_symlink_cycle_key (u, linkto); + seen = hash_table_contains (ftp_visited_symlinks, key) != 0; + xfree (key); + return seen; +} + +static void +ftp_symlink_mark_visited (const struct url *u, const char *linkto) +{ + char *key; + + if (!ftp_visited_symlinks) + ftp_visited_symlinks = make_string_hash_table (0); + key = ftp_symlink_cycle_key (u, linkto); + if (hash_table_contains (ftp_visited_symlinks, key)) + xfree (key); + else + hash_table_put (ftp_visited_symlinks, key, "1"); +} + /* Retrieve a list of files given in struct fileinfo linked list. If a file is a symbolic link, do not retrieve it, but rather try to set up a similar link on the local disk, if the symlinks are @@ -2312,6 +2376,25 @@ The sizes do not match (local %s) -- retrieving.\n\n"), switch (f->type) { case FT_SYMLINK: + /* --ftp-recurse-symlink-dirs: treat a symlink as if it were + a directory so ftp_retrieve_dirs will CWD into it. The + FTP server resolves the symlink server-side; we only need + to avoid infinite loops from circular links. */ + if (opt.ftp_recurse_symlink_dirs && opt.recursive && f->linkto) + { + if (ftp_symlink_already_visited (u, f->linkto)) + { + logprintf (LOG_VERBOSE, + _("Symlink cycle detected at %s -> %s, skipping.\n"), + quote_n (0, f->name), quote_n (1, f->linkto)); + break; + } + ftp_symlink_mark_visited (u, f->linkto); + DEBUGP (("Reclassifying symlink %s -> %s as directory for recursion.\n", + f->name, f->linkto)); + f->type = FT_DIRECTORY; + break; + } /* If opt.retr_symlinks is defined, we treat symlinks as if they were normal files. There is currently no way to distinguish whether they might be directories, and diff --git a/src/init.c b/src/init.c index c8c4bd86f..2cf6f58ec 100644 --- a/src/init.c +++ b/src/init.c @@ -206,6 +206,7 @@ static const struct { { "ftppasswd", &opt.ftp_passwd, cmd_string }, /* deprecated */ { "ftppassword", &opt.ftp_passwd, cmd_string }, { "ftpproxy", &opt.ftp_proxy, cmd_string }, + { "ftprecursesymlinkdirs", &opt.ftp_recurse_symlink_dirs, cmd_boolean }, #ifdef HAVE_SSL { "ftpscleardataconnection", &opt.ftps_clear_data_connection, cmd_boolean }, { "ftpsfallbacktoftp", &opt.ftps_fallback_to_ftp, cmd_boolean }, @@ -448,6 +449,11 @@ defaults (void) */ opt.retr_symlinks = true; + /* Disabled by default: a malicious FTP server could use circular + symlinks to cause excessive downloads. Cycle detection mitigates + this, but the conservative default preserves historical behavior. */ + opt.ftp_recurse_symlink_dirs = false; + #ifdef HAVE_SSL opt.check_cert = CHECK_CERT_ON; opt.ftps_resume_ssl = true; diff --git a/src/main.c b/src/main.c index 76dc65817..680883bbb 100644 --- a/src/main.c +++ b/src/main.c @@ -326,6 +326,7 @@ static struct cmdline_option option_data[] = #ifdef __VMS { "ftp-stmlf", 0, OPT_BOOLEAN, "ftpstmlf", -1 }, #endif /* def __VMS */ + { "ftp-recurse-symlink-dirs", 0, OPT_BOOLEAN, "ftprecursesymlinkdirs", -1 }, { "ftp-user", 0, OPT_VALUE, "ftpuser", -1 }, IF_SSL ( "ftps-clear-data-connection", 0, OPT_BOOLEAN, "ftpscleardataconnection", -1 ) IF_SSL ( "ftps-fallback-to-ftp", 0, OPT_BOOLEAN, "ftpsfallbacktoftp", -1 ) @@ -918,6 +919,8 @@ FTP options:\n"), --preserve-permissions preserve remote file permissions\n"), N_("\ --retr-symlinks when recursing, get linked-to files (not dir)\n"), + N_("\ + --ftp-recurse-symlink-dirs when recursing, descend into symlinks to directories\n"), "\n", #ifdef HAVE_SSL diff --git a/src/options.h b/src/options.h index 8deee02c0..c4a5b6f55 100644 --- a/src/options.h +++ b/src/options.h @@ -117,6 +117,9 @@ struct options retrieving? */ bool retr_symlinks; /* Whether we retrieve symlinks in FTP. */ + bool ftp_recurse_symlink_dirs;/* When recursing over FTP, descend + through symlinks whose target is a + directory. */ char *output_document; /* The output file to which the documents will be printed. */ char *warc_filename; /* WARC output filename */