Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #19167

Closed (moved)
Open
Opened May 24, 2016 by cypherpunks@cypherpunks

torrc parsing b0rks on carriage-return

Windows still terminates text files with '\r\n' by default, this seems to break the handling of quoted values in torrc.

https://gitweb.torproject.org/tor.git/tree/src/common/util.c#n2899

It consumes the quoted string, then consumes any trailing whitespace (tabs or spaces), then it expects either a comment '#' or an '\n'. However if a file edited through notepad.exe for example, the first character it encounters would be '\r', preceding the '\n'.

This results in tor throwing: "[warn] Error while parsing configuration: Excess data after quoted string" then erroring out.

Testing on 0.2.7.6.

Steps to reproduce:

$ printf "SocksPort 54321\nDataDirectory \"/tmp/datadir\"\r\n" > /tmp/conf $ tor -f /tmp/conf ...[notice] Tor v0.2.7.6 (git-605ae665009853bd) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.2h and Zlib 1.2.8 ...[notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning ...[notice] Read configuration file "/tmp/conf". ...[warn] Error while parsing configuration: Excess data after quoted string ...[err] Reading config failed--see warnings above. $

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.9.x-final
Milestone
Tor: 0.2.9.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#19167