Skip to content
Snippets Groups Projects
  1. Jun 30, 2020
  2. Jun 29, 2020
  3. Jun 02, 2016
  4. May 25, 2016
  5. Mar 14, 2016
  6. Mar 09, 2016
  7. Feb 18, 2016
  8. Jan 27, 2016
  9. Jan 12, 2016
  10. Jun 14, 2015
  11. Oct 23, 2014
  12. Jun 20, 2014
  13. Jun 19, 2014
  14. Jun 15, 2014
  15. Jun 01, 2014
  16. May 31, 2014
  17. May 30, 2014
  18. Mar 15, 2014
  19. Mar 11, 2014
    • W. Trevor King's avatar
      irkerd: Extract username and password from submitted URLs · abed95e1
      W. Trevor King authored
      And use them (when present) as the USER username [1] and server PASS
      [2] respectively.  The previous implementation gave no way to set
      PASS, which will vary on a per-target-server level.  There's unlikely
      to be much need to set per-server usernames, except collision
      avoidance (e.g. network X already has an 'irker' user).
      
      I changed the existing IRCServerConnection.connect argument from
      'ircname' to 'realname' to match the USER specs and our
      IRCServerConnection.user implementation.  The 'realname' and
      'username' arguments are currently unset, but you could add command
      line options to set irker-wide defaults, and use the kwargs chain to
      pass them down to the connect method.  The fallback logic is:
      
      * Prefer the setting listed in the URL (although you'd need to add a
        parser to extract 'realname').  If that's empty or missing, fall
        back to
      * The irker-wide default passed down the kwargs chain.  If that's
        empty or missing, fall back to
      * Local defaults ('irker' and 'irker relaying client').
      
      I also tweaked the servername and port extraction in
      Target.__init__(), because they are already parsed out of the netloc
      (along with the username and password) by urlparse().
      
      [1]: https://tools.ietf.org/html/rfc2812#section-3.1.3
      [2]: https://tools.ietf.org/html/rfc2812#section-3.1.1
      abed95e1
    • W. Trevor King's avatar
      irkerd: Initial SSL/TLS implementation · a82724f9
      W. Trevor King authored
      This is pretty basic, just using as much of Python's ssl module as the
      host Python implementation supports.  I also added error-level logging
      of IRCServerConnectionError instances, to get helpful messages like:
      
        Invalid SSL/TLS certificate:
        hostname 'localhost' doesn't match 'irc.example.net'
      
      and:
      
        Couldn't connect to socket: _ssl.c:334: No root certificates
        specified for verification of other-side certificates.
      
      Important milestones in the standard library's ssl module:
      
      * Python 2.5 [1,2]: No ssl module at all
      * Python 2.6 [1,2]: ssl module added
      * Python 3.2 [3,4]: ssl.SSLContext class added, with
        SSLContext.set_default_verify_paths [4].  ssl.match_hostname is also
        added [5], which can be used with the existing getpeercert [6] to
        ensure the server certificate belongs to the target host.
      
      So for full verification, we need Python 3.2.  We can scrape by with
      2.6 and later, by manually supplying a ca_certs path and ignoring
      hostname mismatches.  That's more succeptible to man-in-the-middle
      attacks, but still better than sending server, nick, and channel
      passwords in plaintext.
      
      [1]: http://docs.python.org/2/library/ssl.html
      [2]: http://docs.python.org/2/whatsnew/2.6.html#improved-ssl-support
      [3]: http://docs.python.org/3/whatsnew/3.2.html#ssl
      [4]: http://docs.python.org/3/library/ssl.html#ssl.SSLContext.set_default_verify_paths
      [5]: http://docs.python.org/3/library/ssl.html#ssl.match_hostname
      [6]: http://docs.python.org/2/library/ssl.html#ssl.SSLSocket.getpeercert
      a82724f9
  20. Feb 04, 2014
  21. Dec 25, 2013
  22. Dec 04, 2013
  23. Dec 01, 2013
  24. Nov 30, 2013
  25. Nov 29, 2013
Loading