Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when trying to fetch torlist #246

Closed
TLINDEN opened this issue Dec 12, 2024 · 4 comments
Closed

Crash when trying to fetch torlist #246

TLINDEN opened this issue Dec 12, 2024 · 4 comments

Comments

@TLINDEN
Copy link

TLINDEN commented Dec 12, 2024

I want to operate devzat in an isolated environment. There's no dns available.

On startup it tries to fetch data from https://www.dan.me.uk/torlist/?exit which fails due to a dns error. However, devzat doesn't handle this and crashes instead:

# DEVZAT_CONFIG=/usr/local/etc/devzat.yml daemon -P /tmp/devzat.pid -u nobody /usr/local/sbin/devzat
# Config loaded from /usr/local/etc/devzat.yml
2024/12/12 18:27:29 main.go:154: Get "https://www.dan.me.uk/torlist/?exit": dial tcp: lookup www.dan.me.uk on [::1]:53: read udp [::1]:39505->[::1]:53: read: connection refused
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x100086a]

goroutine 1 [running]:
main.main()
        /tmp/devzat/main.go:156 +0x1ca

The program should put out a warning that the torlist is unavailable or provide a config option to disable the feature.

@Arkaeriit
Copy link
Collaborator

That's a very good point, thanks for noticing it.

@Arkaeriit
Copy link
Collaborator

I've fixed it in #247, can you confirm that it works on your side?

@TLINDEN
Copy link
Author

TLINDEN commented Dec 16, 2024

@Arkaeriit Thanks a lot for fast response and fix! I can confirm, that your patch works as intended. Loving it :)

@quackduck
Copy link
Owner

thank you arkaeriit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants