andstatus / andstatus

Multiple accounts client for multiple Social networks. For Android
http://andstatus.org/
Apache License 2.0
307 stars 69 forks source link

Failed to add account with "dn42" TLD #586

Closed marek22k closed 6 months ago

marek22k commented 6 months ago

Hello,

when I set up an ActivityPub account marek22k@social.dn42, "Invalid value: Username" appears. However, when I use an ICANN TLD, a different message appears and the AndStatus tries to contact the server. I can resolve social.dn42 on my mobile device and use the instance on the web browser, but I can't seem to set it up in AndStatus.

yvolk commented 6 months ago

I see. The problem is with this pattern: https://github.com/andstatus/andstatus/blob/3647e2ed1c9e17d3b8877dbdb8c0ef4adc73b3c1/app/src/main/kotlin/org/andstatus/app/net/social/Patterns.kt#L7

Looks like I need to relax its host part...

yvolk commented 6 months ago

@marek22k I see that my browser doesn't resolve "https://social.dn42", but does resolve "https://social.dn42.us" Could you give more info on why do you need "social.dn42" host in the "uniquename" and how can I see, what is that?

marek22k commented 6 months ago

The dn42, to which the dn42 TLD belongs, is a hobby network and forms an "Internet within the Internet". Participants in dn42 can access .dn42, .neo, .hack, .crxn and several other domains of networks that are connected to them. Behind social.dn42 is just a normal Plemora instance. Here is a picture when I open the page in the browser: pic2 pic3

Alternatively, the dn42 can also be thought of as an internal company network, except that it is operated by a number of BGP hobbyists instead of a company.

yvolk commented 6 months ago

@marek22k In order to make a good fix, we need to understand the whole flow. As I cannot check this, you could fix that regexp, create your own AndStatus build and test further?!

marek22k commented 6 months ago

Unfortunately, I don't have the confidence to build an Android app. But I can test or repair the regex: https://github.com/andstatus/andstatus/pull/587

yvolk commented 6 months ago

@marek22k The question is not only about the regex changing. Your goal is to have successful connection to the ActivityPub server, and that may need additional changes (maybe at both sides. I mean, changes in AndStatus AND in the server). See, for example this discussion: https://github.com/andstatus/andstatus/issues/585

yvolk commented 6 months ago

I found the related discussion: https://stackoverflow.com/questions/9071279/number-in-the-top-level-domain and I think this conclusion (backed by a long list of RFCs) is good for us:

Q: Does top-level domain can contain a number at the end?

A: Yes technically, except if it is purely numerical, then it can not be a TLD, under current rules and for easy reasons to understand (to disambiguate with IP addresses). And it can not contain a number at the end, except if it is an IDN TLD, for reasons enforced by ICANN.

yvolk commented 6 months ago

Hi @marek22k I made the fix and posted updated v.61.01 to #456