bugGNU Wget - Bugs: bug #66441, Wget doesn't use .netrc when...

 
 

bug #66441: Wget doesn't use .netrc when --certificate is set

Submitter:  None
Submitted:  Thu 14 Nov 2024 05:43:22 PM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  5 - Normal Status:  Invalid
Privacy:  Public Assigned to:  rockdaboot
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  1.20
Operating System:  GNU/Linux Reproducibility:  Every Time
Fixed Release:  None Planned Release:  None
Regression:  None Work Required:  None
Patch Included:  No
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 25 Apr 2025 05:59:26 PM UTC, comment #1: 

               =========   Not a Bug ==========

The command wget --certificate 'https://www.nvidia.com' is not correct.

You need to provide a cert file, such as

wget --certificate=mycert.pem 'https://www.nvidia.com'

Tested on version 1.21.4 built on Gnu/Linux Ubuntu 24.04

I see the following lines
newfstatat(AT_FDCWD, "/home/mattia/.netrc", {st_mode=S_IFREG|0664, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/home/mattia/.netrc", O_RDONLY) = 3

mattiadb271 <mattiadb271>
Thu 14 Nov 2024 05:43:22 PM UTC, original submission:  

Steps to reproduce



$ strace -e trace=file wget 'https://www.nvidia.com' 2>&1 | grep netrc
stat("/home/mseebold/.netrc", {st_mode=S_IFREG|0600, st_size=5427, ...}) = 0
openat(AT_FDCWD, "/home/mseebold/.netrc", O_RDONLY) = 3

vs.

$ strace -e trace=file wget --certificate 'https://www.nvidia.com' 2>&1 | grep netrc
<empty stdout>


Observed Behavior

wget doesn't read ~/.netrc if --certificate is set.

Expected behavior

wget reads ~/.netrc weather --certificate is set or not.

Version


$ wget --version
GNU Wget 1.20.3 built on linux-gnu.

-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls
+ntlm +opie +psl +ssl/openssl

Wgetrc:
    /etc/wgetrc (system)
Locale:
    /usr/share/locale
Compile:
    gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
    -DLOCALEDIR="/usr/share/locale" -I. -I../../src -I../lib
    -I../../lib -Wdate-time -D_FORTIFY_SOURCE=2 -DHAVE_LIBSSL -DNDEBUG
    -g -O2 -fdebug-prefix-map=/build/wget-goaWaw/wget-1.20.3=.
    -fstack-protector-strong -Wformat -Werror=format-security
    -DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -g -Wall
Link:
    gcc -DHAVE_LIBSSL -DNDEBUG -g -O2
    -fdebug-prefix-map=/build/wget-goaWaw/wget-1.20.3=.
    -fstack-protector-strong -Wformat -Werror=format-security
    -DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -g -Wall -Wl,-Bsymbolic-functions
    -Wl,-z,relro -Wl,-z,now -lpcre2-8 -luuid -lidn2 -lssl -lcrypto -lz
    -lpsl ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a

Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rockdaboot (Updated the item)
  • -email is unavailable- added by mattiadb271 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-04-27 rockdaboot StatusNone Invalid
        Assigned toNone rockdaboot
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code