-
Notifications
You must be signed in to change notification settings - Fork 50
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
Cannot fetch content with a XOR-URL which typeTag is greater than 65535 #429
Comments
So i've done some digging around, and this is for sure not even reaching any webRequest we can hook into. So it looks, we file a bug on the basis that this isn't expected behaviour (as technically port numbers can be larger based on the spec). BUT, this behaviour exists in chrome (larger ports are just treated as search queries and no attempt is made to resolve them...), so I doubt very much that it'll get much traction. SOOOOOOOOooooo... How do we want to handle this? We can attempt an ugly workaround... catch the errors... check if its a BIG port number/XOR url, then fetch it, and server that from another URL, which we then mask with modifying headers etc... Or... something else? |
@bochaco @joshuef I'm confused, looking at the TCP RFC, page 15, a port can only be a 16-bit value, right? Which spec refers to port numbers larger than 2**16 - 1? |
Ah I see, port range not specified in URL spec: https://www.w3.org/Addressing/URL/url-spec.txt When encoding the XOR-URL, I think we need to change from using a colon to specify MData type tags to another character such as search query. |
The encoding ues multiformats such as multibase, should we also have a multiformats for our network data types so that, for example, the encoding specifies whether it represents an MData and should have a type tag or whether it's an IData and should not have a type tag? |
I think the multiformats has already been covered in the current implementation @hunterlester . It's definitely included in the deps now. Though not sure if it's used for exactly what you're describing. I'm all for an alternative char I think. From the URL spec:
From that I'd suggest not going for something reserved. I think what we need is an unreserved char, that's not present in the base32 implementation. So how's about
|
The browser considers a XOR-URL invalid when the typeTag part is greater than 65535 e.g.
safe://hyfktcegr68th4og68y9eks99cie14qtw44zpmjdttqqujxr3bb5jnnip7r:160485
triggers errorInvalid URL: safe://hyfktcegr68th4og68y9eks99cie14qtw44zpmjdttqqujxr3bb5jnnip7r:160485
The text was updated successfully, but these errors were encountered: