summaryrefslogtreecommitdiff
path: root/lib/net
AgeCommit message (Collapse)Author
2021-07-29[ruby/net-http] Enforce write timeout when body_stream is usedMiguel Teixeira
The existing implementation of `Net::HTTP#write_timeout` relies on `Net::BefferedIO` to trigger the `Net::WriteTimeout` error. This commit changes `send_request_with_body_stream` to remove the optimization that was making `Net::HTTP#write_timeout` not work when `body_stream` is used. Open issue: https://bugs.ruby-lang.org/issues/17933 https://github.com/ruby/net-http/commit/a0fab1ab52
2021-06-16[ruby/net-protocol] Get rid of `__send__`Nobuyoshi Nakada
Mitigate the security risk: https://devcraft.io/2021/01/07/universal-deserialisation-gadget-for-ruby-2-x-3-x.html https://github.com/ruby/net-protocol/commit/a9970437e8
2021-05-31[ruby/net-protocol] Bump version to 0.1.1Hiroshi SHIBATA
https://github.com/ruby/net-protocol/commit/97c4b68528
2021-05-27Promote net-smtp to the bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4530
2021-05-27Promote net-pop to the bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4530
2021-05-27Promote net-imap to the bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4530
2021-05-27Promote net-ftp to the bundled gemsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/4530
2021-05-12[ruby/net-ftp] Bump version to 0.1.2Shugo Maeda
https://github.com/ruby/net-ftp/commit/895ba44b3c
2021-05-06[ruby/net-http] Do not require stringioKazuki Yamaguchi
It is not used in net/http library code since commit 15ccd0118c13 (r36473 in ruby svn trunk, 2012). require's in test suite are also cleaned up. https://github.com/ruby/net-http/commit/996d18a43f
2021-05-06Fixed the file path for net-imap.gemspecHiroshi SHIBATA
2021-05-06Move net-imap.gemspec to under the lib/net/imap directory.Hiroshi SHIBATA
2021-05-06[ruby/net-imap] Many documentation improvementsnicholas a. evans
* updated obsoleted RFCs to current versions * linked most references to their RFCs * linked extension commands to their RFCs * removed unidiomatic `()` from instance method links * escaped `IMAP` in a few places * converted all response structs to explicit classes: this makes much nicer rdoc output than listing them all under "constants" * grouped flags constants into their own sections https://github.com/ruby/net-imap/commit/9cd562ac84
2021-05-06[ruby/net-imap] Move send_*_data into net/imap/command_datanicholas a. evans
Partially implements #10. https://github.com/ruby/net-imap/commit/64d1080d63
2021-05-06[ruby/net-imap] Move flags to net/imap/flagsnicholas a. evans
Partially implements #10. https://github.com/ruby/net-imap/commit/2a9afa83bf
2021-05-06[ruby/net-imap] Move UTF7 & datetime formatting to net/imap/data_encodingnicholas a. evans
Partially implements #10. https://github.com/ruby/net-imap/commit/0d43c5e856
2021-05-06[ruby/net-imap] move command data formatters to net/imap/command_datanicholas a. evans
Partially implements #10. https://github.com/ruby/net-imap/commit/24e929fdd2
2021-05-06[ruby/net-imap] move response data structs to net/imap/response_datanicholas a. evans
Partially implements #10. https://github.com/ruby/net-imap/commit/746757b936
2021-05-06[ruby/net-imap] move ResponseParser to lib/net/imap/response_parsernicholas a. evans
Partially implements #10. https://github.com/ruby/net-imap/commit/c2408aac9a
2021-05-06[ruby/net-imap] Clean up authenticators rdocnicholas a. evans
Added RFC links to all SASL mechanism specifications. https://github.com/ruby/net-imap/commit/53ff4b0c09
2021-05-06[ruby/net-imap] Update AUTH=PLAIN to be a little closer to RFC4616nicholas a. evans
* Add authzid support * must not contain NULL chars * improve rdoc https://github.com/ruby/net-imap/commit/a587fc71b7
2021-05-06[ruby/net-imap] Move each authenticator to its own filenicholas a. evans
Also updates rdoc with SASL specifications and deprecations. Of these four, only `PLAIN` isn't deprecated! +@@authenticators+ was changed to a class instance var +@authenticators+. No one should have been using the class variable directly, so that should be fine. https://github.com/ruby/net-imap/commit/23f241b081
2021-04-28[ruby/net-imap] Fix typo intentionaly -> intentionally [ci skip]Ryuta Kamizono
https://github.com/ruby/net-imap/commit/4057c662e7
2021-04-28[ruby/net-http] Initialize OpenSSL early before creating TCPSocketJeremy Evans
OpenSSL make take some time to initialize, and it would be best to take that time before connecting instead of after. From joshc on Redmine. Fixes Ruby Bug #9459 https://github.com/ruby/net-http/commit/14e09fba24
2021-04-28[ruby/net-http] Fix the regexp used to clean the hostJean Boussier
Introduced in https://github.com/ruby/ruby/commit/c1652035644 `/s` marks the regexp as encoded with Windows-31J which makes little sense. Nurse thinks the intent was to use `/m` for a multi-line regexp. https://github.com/ruby/net-http/commit/6c15342cdf
2021-04-28[ruby/net-http] Decode user and password from env configured proxyLukas Eipert
If someone sets an env variable defining a http_proxy, containing a username / password with percent-encoded characters, then the resulting base64 encoded auth header will be wrong. For example, suppose a username is `Y\X` and the password is `R%S] ?X`. Properly URL encoded the proxy url would be: http://Y%5CX:R%25S%5D%20%3FX@proxy.example:8000 The resulting proxy auth header should be: `WVxYOlIlU10gP1g=`, but the getters defined by ruby StdLib `URI` return a username `Y%5CX` and password `R%25S%5D%20%3FX`, resulting in `WSU1Q1g6UiUyNVMlNUQlMjAlM0ZY`. As a result the proxy will deny the request. Please note that this is my first contribution to the ruby ecosystem, to standard lib especially and I am not a ruby developer. References: - https://gitlab.com/gitlab-org/gitlab/-/issues/289836 - https://bugs.ruby-lang.org/projects/ruby-master/repository/trunk/revisions/58461 - https://bugs.ruby-lang.org/issues/17542 https://github.com/ruby/net-http/commit/e57d4f38aa
2021-04-28[ruby/net-http] Replace Timeout.timeout in Net:HTTP#connectmohamed
Use Socket.tcp's connect_timeout option instead https://github.com/ruby/net-http/commit/753cae3bbc
2021-04-28[ruby/net-smtp] mod: bump to a new VERSION that could be checked for ↵Tom Freudenberg
testings >0.2.1 https://github.com/ruby/net-smtp/commit/8f2c9323e2
2021-04-28[ruby/net-smtp] Removed needless files from Gem::Specification#filesHiroshi SHIBATA
https://github.com/ruby/net-smtp/commit/69bba6b125
2021-04-28[ruby/net-smtp] Replace Timeout.timeout with socket timeoutmohamed
Timeout.timeout is inefficient since it spins up a new thread for each invocation, use Socket.tcp's connect_timeout option instead https://github.com/ruby/net-smtp/commit/6ae4a59f05
2021-04-28[ruby/net-smtp] Net::SMTP.start() and #start() accepts ssl_context_params ↵Tom Freudenberg
keyword argument Additional params are passed to OpenSSL::SSL::SSLContext#set_params. For example, `Net::SMTP#start(ssl_context_params: { cert_store: my_store, timeout: 123 })` calls `set_params({ cert_store: my_store, timeout: 123 })`. https://github.com/ruby/net-smtp/commit/4213389c21
2021-04-27[ruby/net-ftp] Replace "iff" with "if and only if"Gannon McGibbon
iff means if and only if, but readers without that knowledge might assume this to be a spelling mistake. To me, this seems like exclusionary language that is unnecessary. Simply using "if and only if" instead should suffice. https://github.com/ruby/net-ftp/commit/e920473618
2021-04-27[ruby/net-ftp] Reduce resource cosumption of Net::FTP::TIME_PARSERShugo Maeda
Reported by Alexandr Savca as a DoS vulnerability, but Net::FTP is a client library and the impact of the issue is low, so I have decided to fix it as a normal issue. Based on patch by nobu. https://github.com/ruby/net-ftp/commit/a93af636f8
2021-04-27[ruby/net-ftp] Close the passive connection data socket if there is an error ↵Jeremy Evans
setting up the transfer Previously, the connection leaked in this case. This uses begin/ensure and checking for an error in the ensure block. An alternative approach would be to not even perform the connection until after the RETR (or other) command has been sent. However, I'm not sure all FTP servers support that. The current behavior is: * Send (PASV/EPSV) * Connect to the host/port returned in 227/229 reply * Send (RETR/other command) Changing it to connect after the RETR could break things. FTP servers might expect that the client has already connected before sending the RETR. The alternative approach is more likely to introduce backwards compatibility issues, compared to the begin/ensure approach taken here. Fixes Ruby Bug 17027 https://github.com/ruby/net-ftp/commit/6e8535f076
2021-04-27[ruby/net-ftp] Replace Timeout.timeout with socket timeoutmohamed
Timeout.timeout is inefficient since it spins up a new thread for each invocation, use Socket.tcp's connect_timeout option instead when we aren't using SOCKS (we can't replace Timeout.timeout for SOCKS yet since SOCKSSocket doesn't have a connect_timeout option). https://github.com/ruby/net-ftp/commit/d65910132f
2021-04-22[ruby/net-imap] Bump version to 0.2.1Shugo Maeda
https://github.com/ruby/net-imap/commit/31f96ea884
2021-04-22[ruby/net-imap] Set timeout for IDLE responsesShugo Maeda
Fixes #14 https://github.com/ruby/net-imap/commit/39d39ff9bb
2021-04-22Merge net-imap-0.2.0Hiroshi SHIBATA
2021-03-31Enclose the code that was accidentally a link in "tt"aycabta
2021-01-23[ruby/net-http] Replace "iff" with "if and only if"Gannon McGibbon
iff means if and only if, but readers without that knowledge might assume this to be a spelling mistake. To me, this seems like exclusionary language that is unnecessary. Simply using "if and only if" instead should suffice. https://github.com/ruby/net-http/commit/ffb87cad32
2021-01-07We don't need "require 'uri'" after "require 'net/http'".Igor Zubkov
2020-12-22Update library versions of the default gems.Hiroshi SHIBATA
They are followed up with https://github.com/ruby/ruby/commit/8fb02b7a97317090e3946e6f2d4a7d034f9699f1
2020-12-03digest gem is available nowHiroshi SHIBATA
2020-12-02Added dependencies for net-popHiroshi SHIBATA
2020-12-02Added dependencies for net-imapHiroshi SHIBATA
2020-12-02Added dependencies for net-ftpHiroshi SHIBATA
2020-12-02Added dependencies for net-httpHiroshi SHIBATA
2020-12-02Added dependencies for net-smtpHiroshi SHIBATA
2020-12-02Added dependencies for net-protocolHiroshi SHIBATA
2020-11-18[ruby/net-smtp] Bump version to 0.2.1Hiroshi SHIBATA
https://github.com/ruby/net-smtp/commit/6e5c09dcc4
2020-11-17Import net-smtp-0.2.0 from https://github.com/ruby/net-smtpHiroshi SHIBATA