[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #26348 [Obfuscation/Snowflake]: Guard against large reads



#26348: Guard against large reads
-----------------------------------+------------------------------
 Reporter:  dcf                    |          Owner:  cohosh
     Type:  defect                 |         Status:  needs_review
 Priority:  Medium                 |      Milestone:
Component:  Obfuscation/Snowflake  |        Version:
 Severity:  Normal                 |     Resolution:
 Keywords:  easy                   |  Actual Points:
Parent ID:                         |         Points:  1
 Reviewer:                         |        Sponsor:  Sponsor19
-----------------------------------+------------------------------
Changes (by cohosh):

 * status:  assigned => needs_review


Comment:

 Here's a fix: https://github.com/cohosh/snowflake/compare/ticket26348

 I wrote a test for one of the broker reads... writing tests for the others
 in a nice way would require a bit of a refactor because convey currently
 has the http request for /proxy and /client set.

 There's also a test for the client. No tests for proxy-go right now
 because we have no tests for that... made a note on #29259.

 I noticed
 https://github.com/cohosh/snowflake/blob/master/client/lib/lib_test.go#L28
 {{{
 type MockResponse struct{}

 func (m *MockResponse) Read(p []byte) (int, error) {
         p = []byte(`{"type":"answer","sdp":"fake"}`)
         return 0, nil
 }
 func (m *MockResponse) Close() error { return nil }
 }}}
 is never used.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26348#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs