Closed Bug 1630439 Opened 4 years ago Closed 4 years ago

Issue opening url with underscore at the end on Android

Categories

(Core :: Networking: DNS, defect, P3)

77 Branch
Unspecified
Android
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: tim.langhorst, Unassigned)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(3 files)

When I try to open an URL with an underscore (for example https://cromefire_.gitlab.io/nativeshell-api-definition) it immediately returns "Address Not Found" (it doesn't seem to make a network request at all).

This affects both nightly and stable, but it works fine on desktop.

I moved this to Core / Networking: DNS because I am not sure what to do with this or whether this should work.

Component: General → Networking: DNS
Product: Firefox for Android → Core
Version: Firefox 77 → 77 Branch
Flags: needinfo?(valentin.gosu)
See Also: → 1632163

So, _ in a hostname isn't really common, but we allow it nonetheless.
For some reason it seems the android implementation of getaddrinfo doesn't.
When I switched to using TRR, the URL in comment 0 worked with no problem.
I also tried a custom C++ program that calls getaddrinfo, and had the same issue.
I'm not sure how Chrome is working. Maybe they're using a custom resolver?

Flags: needinfo?(valentin.gosu)

So should this be reported to Android?

(In reply to Tim Langhorst from comment #4)

So should this be reported to Android?

Likely yes.

If you can provide me with details which function is affected and maybe a small "reproduction" I can report it there

Attached file dns_test.c

I ran this test on Linux (it works) and on Android in the CxxDroid App where it didn't.

It would be nice to find a fix for this, but it's not clear what that would be.
Seems like a getaddrinfo bug. Looking at Chrome's code it would seem they use the same, not sure what their trick is to make this work.

Severity: -- → S3
Priority: -- → P3
Summary: Issue opening url with underscore at the end → Issue opening url with underscore at the end on Android
Whiteboard: [necko-triaged]

(In reply to Valentin Gosu [:valentin] (he/him) from comment #8)

Seems like a getaddrinfo bug. Looking at Chrome's code it would seem they use the same, not sure what their trick is to make this work.

Once I disabled the Async DNS feature in Chrome it stopped working too.
https://discourse.pi-hole.net/t/disable-async-dns-resolver-in-google-chrome/9500

Definitely an Android bug. Closing since there's nothing we can do here.
It is mitigated by using TRR (although we have no UI for it on Android).

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID

How can I enable TRR?

(In reply to Tim Langhorst from comment #10)

How can I enable TRR?

Go to about:config and set network.trr.mode to 2
More info here and here

The issue already existed in a similar fashion I added the repro snippet: https://issuetracker.google.com/issues/154694663

See Also: → 1870496
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: