-
Notifications
You must be signed in to change notification settings - Fork 158
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
[BUG] NIP05 verification follows redirects against specification #915
Comments
NIP05 verification should use a httpclient with followRedirects OFF. Looking at the code there are currently 2 httpclient singletons: with and without proxy. Am I correct assuming we would need 2 more so in total there would be 4 singletons: httpclient, httpclientwithoutproxy, httpclientNoRedirect, httpclientwithoutproxyNoRedirect? Or is this overcomplicating it? |
You can use newBuilder() directly on the NIP-05 verification fetch HttpClientManager.getHttpClient()
.newBuilder()
.followRedirects(false)
.followSslRedirects(false)
.build() |
Thats nice... I'm worried about the extensive usage of nip05 verification. This will create a lot of new httpclients? |
or possibly will update the singleton to not use redirects which would be bad when fetching regular nostr content? |
fixed |
Describe the bug
Currently nip05 verification will follow a redirect for nip05 verification.
From the spec NIP05 specification:
Expected behaviour
NIP05 verification should fail if it encounters a 3xx redirect
Note
HTTP to HTTPS redirect should be considered to be allowed but looking at the code HTTPS is used by default. FollowRedirects OFF will likely turn off protocol redirects as well
The text was updated successfully, but these errors were encountered: