Opened 10 months ago

Closed 9 months ago

#27044 closed defect (fixed)

be more strict in parsing HiddenServicePort

Reported by: toralf Owned by:
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs, tor-config
Cc: rl1987 Actual Points:
Parent ID: Points:
Reviewer: dgoulet Sponsor:

Description

A possible typo like

HiddenServicePort 80 127.0.0.1 1234

is accepted.
IMO Tor should at least warn about a possible missing colon.

Child Tickets

Change History (8)

comment:1 Changed 10 months ago by nickm

Milestone: Tor: unspecified

Seems worth fixing to me.

comment:2 Changed 9 months ago by rl1987

Status: newneeds_review

comment:3 Changed 9 months ago by nickm

Milestone: Tor: unspecifiedTor: 0.3.5.x-final

comment:4 in reply to:  2 Changed 9 months ago by dgoulet

Keywords: tor-hs tor-config added
Reviewer: dgoulet
Status: needs_reviewneeds_revision

Replying to rl1987:

https://github.com/torproject/tor/pull/274

The right place to check for this is in rend_service_parse_port_config(). See config_generic_service() which error if we can't parse the port line.

(That function name is confusing, it should really be renamed to something generic since v2 and v3 uses it so ignore that part :).

comment:5 Changed 9 months ago by rl1987

Status: needs_revisionneeds_review

comment:6 Changed 9 months ago by rl1987

Cc: rl1987 added

comment:7 Changed 9 months ago by dgoulet

Status: needs_reviewmerge_ready

lgtm;

comment:8 Changed 9 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

lgtm too. merging.

Note: See TracTickets for help on using tickets.