diff options
author | Alexander Færøy <ahf@torproject.org> | 2020-07-09 02:16:11 +0000 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2020-07-14 17:41:51 +0000 |
commit | abe7196c53f23186f06e1c56a406ec4c9a75a4f7 (patch) | |
tree | ea5837cc885721db538faf778a107398a829fc02 /changes/bug33781 | |
parent | c9751e26119e375fcbc74107e89958957c00ee5e (diff) | |
download | tor-abe7196c53f23186f06e1c56a406ec4c9a75a4f7.tar.gz tor-abe7196c53f23186f06e1c56a406ec4c9a75a4f7.zip |
Strip '\r' characters when reading text files on Unix.
This patch ensures that we strip "\r" characters on both Windows as well
as Unix when we read text files. This should prevent the issue where
some Tor state files have been moved from a Windows machine, and thus
contains CRLF line ending, to a Unix machine where only \n is needed.
We add a test-case to ensure that we handle this properly on all our
platforms.
See: https://bugs.torproject.org/tpo/core/tor/33781
Diffstat (limited to 'changes/bug33781')
-rw-r--r-- | changes/bug33781 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/changes/bug33781 b/changes/bug33781 new file mode 100644 index 0000000000..9f63ab0a2c --- /dev/null +++ b/changes/bug33781 @@ -0,0 +1,7 @@ + o Minor bugfixes (compatibility): + - Strip '\r' characters when reading text files on Unix platforms. + This should resolve an issue where a relay operator migrates a relay from + Windows to Unix, but does not change the line ending of Tor's various state + files to match the platform, the CRLF line endings from Windows ends up leaking + into other files such as the extra-info document. Fixes bug 33781; bugfix on + 0.0.9pre5. |