Opened 3 years ago

Closed 3 years ago

#22670 closed defect (implemented)

Clean up warning behavior of decompression code in connection_dir_client_reached_eof()

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: review-group-19
Cc: teor, ahf Actual Points: .2
Parent ID: Points: .2
Reviewer: Sponsor: Sponsor4


There are several goofy things about the code that handles decompression in the above function.

First, when it decides to try two decompression methods, it logs failures from either one, even though it's only a big problem when they both fail.

Second, it treats a mismatched content-encoding as "info" when it should probably be "protocol_warn".

Third, it should be in its own function.

Fourth, the second call to warn_disallowed_anonymous_compression should probably only happen when we are about to call tor_uncompress() the second time.

Child Tickets

Change History (9)

comment:1 Changed 3 years ago by nickm

Owner: set to nickm
Status: newaccepted

comment:2 Changed 3 years ago by nickm

Actual Points: .2
Points: .2
Status: acceptedneeds_review

For review: bug22670_031

comment:3 Changed 3 years ago by nickm

Cc: teor ahf added

comment:4 Changed 3 years ago by nickm

Sponsor: Sponsor4

comment:5 Changed 3 years ago by nickm

Parent ID: #22502

comment:6 Changed 3 years ago by nickm

Keywords: review-group-19 added

comment:7 Changed 3 years ago by ahf

Status: needs_reviewmerge_ready

Nice cleanup! Looks good to me.

comment:8 Changed 3 years ago by nickm

ty; merged to 0.3.1 and forward.

comment:9 Changed 3 years ago by nickm

Resolution: implemented
Status: merge_readyclosed
Note: See TracTickets for help on using tickets.