ssbc / patchwork

A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB).
https://www.scuttlebutt.nz
GNU Affero General Public License v3.0
3.58k stars 333 forks source link

Fails to parse ipv6 invites #153

Closed cryptix closed 8 years ago

cryptix commented 9 years ago

sbot generates the following invite code when only a IPv6 address is configured:

"2a03:2267::ba27:ebff:fe8c:5a4d:8080:@gYCJpN4eGDjHFnWW2Fcusj8O4QYbVDUW6rNYh7nNEnc=.ed25519~DxiHEv+ds+zUzA49efDgZk8ssGeqrp/5kgvRVzTM7vU="

Pasting this as an Invite leads to an Something is wrong with the invite code.-Error. Using [...v6..]:$port:@invite.. also fails with the same error.

Workaround: Setting up a /etc/hosts- or DNS-Entry.

PS: ffhh pub coming next week

pfrazee commented 9 years ago

Ok thanks for the report!

dominictarr commented 9 years ago

the problem here is that https://github.com/ssbc/ssb-ref/blob/0e59569105d2e5d030ed69454cd16b539d81b1ab/index.js#L31-L46 is not aware of ipv6 addresses.