[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #33040 [Circumvention/Snowflake]: Minor Snowflake refactoring
#33040: Minor Snowflake refactoring
-------------------------------------+------------------------
Reporter: dcf | Owner: dcf
Type: enhancement | Status: closed
Priority: Medium | Milestone:
Component: Circumvention/Snowflake | Version:
Severity: Normal | Resolution: fixed
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: cohosh | Sponsor:
-------------------------------------+------------------------
Changes (by dcf):
* status: merge_ready => closed
* resolution: => fixed
Comment:
Replying to [comment:3 cohosh]:
> Do we still need a check for a nil BrokerChannel that was removed in
[https://gitweb.torproject.org/user/dcf/snowflake.git/commit/?h=bug33040-refactor&id=84e9b0626c1eb3de2f97af7379c973413f6b476d
this commit]? It looks like `NewBrokerChannel` can return `nil` on error.
You're totally right. I misread what that function was doing.
> In this case that seems to be if `brokerURL` isn't properly formatted.
Perhaps an error check and log message in `client/snowflake.go` on the
return of that function?
I think this is a good idea so I made a small change
([https://gitweb.torproject.org/user/dcf/snowflake.git/log/?h=bug33040-refactor-2
bug33040-refactor-2],
[https://gitweb.torproject.org/user/dcf/snowflake.git/diff/?h=bug33040-refactor-2
diff against previous]) before pushing. It moves the URL syntax check to
happen once at the top level, and the result of the code can assume it has
a non-`nil` `BrokerChannel.url`.
Merged in [https://gitweb.torproject.org/pluggable-
transports/snowflake.git/log/?id=db1ba4791b101b7a83060261bb44769dd7db8e25
db1ba4791b101b7a83060261bb44769dd7db8e25].
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33040#comment:4>
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