ogham / dog

A command-line DNS client.
https://dns.lookup.dog/
European Union Public License 1.2
6.19k stars 177 forks source link

Panic crash when using `-H` argument #135

Open codeswhite opened 5 months ago

codeswhite commented 5 months ago

When running:

dog customdomain -H

It panics with an error about HTTPS but the crash seems to not be properly handled.

Output:

dog customdomain -H                                                                                                                                
thread 'main' panicked at 'Invalid HTTPS nameserver', dns-transport/src/https.rs:55:50                                                           
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace                                                                    
[1]    683935 IOT instruction (core dumped)  dog customdomain -H

Additional info:

$ export RUST_BACKTRACE=full
$ dog customdomain -H           
thread 'main' panicked at 'Invalid HTTPS nameserver', dns-transport/src/https.rs:55:50
stack backtrace:
   0:      0x69fbdf39acc - <unknown>
   1:      0x69fbded281c - <unknown>
   2:      0x69fbdf3a47c - <unknown>
   3:      0x69fbdf3aef1 - <unknown>
   4:      0x69fbdf3aa92 - <unknown>
   5:      0x69fbdf3aa06 - <unknown>
   6:      0x69fbdf3a9c2 - <unknown>
   7:      0x69fbdec91c2 - <unknown>
   8:      0x69fbded2f20 - <unknown>
   9:      0x69fbded2ecb - <unknown>
  10:      0x69fbdec92d6 - <unknown>
  11:      0x69fbdee72c0 - <unknown>
  12:      0x69fbdecd776 - <unknown>
  13:      0x69fbdecc2b9 - <unknown>
  14:      0x69fbdefe543 - <unknown>
  15:      0x69fbdeceb93 - <unknown>
  16:     0x6758ea039c88 - <unknown>
  17:     0x6758ea039d4c - __libc_start_main
  18:      0x69fbdecb5c5 - <unknown>
  19:                0x0 - <unknown>
[1]    684277 IOT instruction (core dumped)  dog customdomain -H

Running on archlinux kernel 6.9.3, installed via pacman

$ dog --version
... v0.1.0 ...

$ sha256sum `which dog`                                      
45f8b9dccacae8a7313a9e285a892ebe4f6215192cc2b761b4f6bd59e7e7e7c2  /usr/bin/dog
zQueal commented 2 months ago

Just got this on windows, as well;

❯ dog -H TXT google.com
thread 'main' panicked at 'Invalid HTTPS nameserver', dns-transport\src\https.rs:55:50
jurekl commented 2 months ago

The occurring surprising errors and strange/absurd messages caused me to give up on this program and switch to a problem-free q