Skip to content

private ipv6 address identified as public #2623

@marcus-pousette

Description

@marcus-pousette
  • Version:
    1.8.1

  • Subsystem:
    dialer, defaultAddressSort

Severity:

Low

Description:

Address

const address = '/ip6/::ffff:7f00:1/tcp/52498/p2p/12D3KooWFp4Uq323R3rF1ukZouXhmai37TejRJwMmsRg9fMM2jjY/p2p-circuit/p2p/12D3KooWPv7ef6tF1PjK1vFzjxW11rpcxp2rHjowtSLU4Xt2CNWP'

evaluates

import { isPrivate } from './multiaddr/is-private.js';
isPrivate(address) 

is false, but expected true?

This makes the default address sorter to prefer this address over other addresses

This one

/ip4/127.0.0.1/tcp/52493/ws/p2p/12D3KooWFp4Uq323R3rF1ukZouXhmai37TejRJwMmsRg9fMM2jjY/p2p-circuit/p2p/12D3KooWPv7ef6tF1PjK1vFzjxW11rpcxp2rHjowtSLU4Xt2CNWP

evaluates to as private correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    exp/beginnerCan be confidently tackled by newcomershelp wantedSeeking public contribution on this issuekind/bugA bug in existing code (including security flaws)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions