Opened 8 years ago

Last modified 3 years ago

#4648 new defect

Tor shouldn't call expand_filename on filenames specified on the command line

Reported by: rransom Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-client configuration directory filesystem
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


The Unix shell is responsible for expanding ~/... in filenames specified on command lines. This allows users and scripts to quote that so it won't be expanded.

Unfortunately, Tor expands ~/... in filenames specified on its command line itself.

rransom@ceres:~/tmp$ mkdir '~'
rransom@ceres:~/tmp$ touch '~/my-screwily-named-torrc'
rransom@ceres:~/tmp$ /usr/sbin/tor -f '~/my-screwily-named-torrc'
Dec 04 16:19:51.190 [notice] Tor v0.2.3.8-alpha (git-da15c0cbd6638af3). This is experimental software. Do not rely on it for strong anonymity. (Running on Linux x86_64)
Dec 04 16:19:51.192 [warn] Unable to open configuration file "/home/rransom/my-screwily-named-torrc".
Dec 04 16:19:51.192 [err] Reading config failed--see warnings above.

(That wasn't supposed to work, but it wasn't supposed to fail that way, either.)

Child Tickets

Change History (5)

comment:1 Changed 8 years ago by arma

Fixing this sounds fine to me

comment:2 Changed 8 years ago by nickm

Milestone: Tor: 0.2.3.x-finalTor: unspecified

Seems worth fixing; but the fix is not needed for 0.2.3.x.

comment:3 Changed 8 years ago by nickm

Keywords: tor-client added

comment:4 Changed 8 years ago by nickm

Component: Tor ClientTor

comment:5 Changed 3 years ago by nickm

Keywords: configuration directory filesystem added
Severity: Normal
Note: See TracTickets for help on using tickets.