]> git.ipfire.org Git - thirdparty/tor.git/commit
rust: Mirror TROVE-2018-005 fix in Rust protover implementation.
authorIsis Lovecruft <isis@torproject.org>
Wed, 21 Mar 2018 02:22:54 +0000 (02:22 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 22 May 2018 16:27:25 +0000 (12:27 -0400)
commit569b4e57e23d728969a12751afc6b45f32d0f093
tree6f929b34a7ff96b34a06fe44aebd42f35e007a72
parenta3a8d80bebdbb8988a2f33dea8b18a41e445c06f
rust: Mirror TROVE-2018-005 fix in Rust protover implementation.

 * REFACTORS `UnvalidatedProtoEntry::from_str` to place the bulk of the
   splitting/parsing logic in to a new
   `UnvalidatedProtoEntry::parse_protocol_and_version_str()` method (so that
   both `from_str()` and `from_str_any_len()` can call it.)
 * ADD a new `UnvalidatedProtoEntry::from_str_any_len()` method in order to
   maintain compatibility with consensus methods older than 29.
 * ADD a limit on the number of characters in a protocol name.
 * FIXES part of #25517: https://bugs.torproject.org/25517
src/rust/protover/ffi.rs
src/rust/protover/protover.rs