question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot fetch content with a XOR-URL which typeTag is greater than 65535

See original GitHub issue

The browser considers a XOR-URL invalid when the typeTag part is greater than 65535 e.g. safe://hyfktcegr68th4og68y9eks99cie14qtw44zpmjdttqqujxr3bb5jnnip7r:160485 triggers error Invalid URL: safe://hyfktcegr68th4og68y9eks99cie14qtw44zpmjdttqqujxr3bb5jnnip7r:160485

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joshuefcommented, Jan 4, 2019

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. ?: could this be confused with query params by a webapp? Maybe something still valid in a url, but not used as part of URL structs in general.

From the URL spec:

                        
  alphanum2              alpha | digit | - | _ | . | +  
                         
  xalpha                  alpha | digit | safe | extra | escape   
                         
  xalphas                 xalpha [ xalphas ]   
                         
  xpalpha                 xalpha | +   
                         
  xpalphas                xpalpha [ xpalphas ]   
                         
  ialpha                  alpha [ xalphas ] 
                         
  alpha                   a | b | c | d | e | f | g | h | i | j | k |
                         l | m | n | o  | p | q | r | s | t | u | v |
                         w | x | y | z | A | B | C  | D | E | F | G |
                         H | I | J | K | L | M | N | O | P |  Q | R |
                         S | T | U | V | W | X | Y | Z   
                         
  digit                   0 |1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9   
                         
  safe                    $ | - | _ | @ | . | &  | + | - 
                         
  extra                  ! | * |  " |  ' | ( | )  | , 
                         
  reserved                 =  |  ;  |  /  |  #  | ? |  : | space 
                         
  escape                  % hex hex   
                         
  hex                     digit | a | b | c | d | e | f | A | B | C |
                         D | E | F   
                         
  national                { | } | vline | [ | ] | \ | ^ | ~   
                         
  punctuation             < | > 
                         
  digits                  digit [ digits ]   
                         
  alphanum                alpha | digit   
                         
  alphanums               alphanum [ alphanums ] 

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 ! ?

safe://hyfktcebyxbzht6j6o7fcwbbjh4o3chp16131q437t3kst5foer6ehzchny!150001

0reactions
hunterlestercommented, Jan 3, 2019

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[RFC Discussion]: XOR-URLs - RFCs - Safe Dev Forum
Essentially, it's reserved in url schema for port numbers and so cannot be larger than 65535. Which is problematic.
Read more >
Release: SAFE Browser v0.11.0 - Updates
There is a known issue with the browser considering a XOR-URL invalid when the typeTag part is greater than 65535 (see issue #429)....
Read more >
Safe Network CLI: A Rust Application Which Implements A CLI
Fetching 'maidsafe-testnet' network connection information from ... When syncing content using an NRS-URL (see NRS section below for more information about ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found