aboutsummaryrefslogtreecommitdiff
path: root/P2P/IO.hs
Commit message (Collapse)AuthorAge
* implemented git-annex-shell p2pstdioGravatar Joey Hess2018-03-07
| | | | | | | | | | | Not yet used by git-annex, but this will allow faster transfers etc than using individual ssh connections and rsync. Not called git-annex-shell p2p, because git-annex p2p does something else and I don't want two subcommands with the same name between the two for sanity reasons. This commit was sponsored by Øyvind Andersen Holm.
* Always use filesystem encoding for all file and handle reads and writes.Gravatar Joey Hess2016-12-24
| | | | | This is a big scary change. I have convinced myself it should be safe. I hope!
* enable-tor: When run as a regular user, test a connection back to the hidden ↵Gravatar Joey Hess2016-12-24
| | | | | | | | | | | | | | | | | | | service over tor. This way we know that after enable-tor, the tor hidden service is fully published and working, and so there should be no problems with it at pairing time. It has to start up its own temporary listener on the hidden service. It would be nice to have it start the remotedaemon running, so that extra step is not needed afterwards. But, there may already be a remotedaemon running, in communication with the assistant and we don't want to start another one. I thought about trying to HUP any running remotedaemon, but Windows does not make it easy to do that. In any case, having the user start the remotedaemon themselves lets them know it needs to be running to serve the hidden service. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
* refactorGravatar Joey Hess2016-12-24
|
* Revert "close"Gravatar Joey Hess2016-12-24
| | | | | | This reverts commit 6c089cff615bc44ca94cc4ca77dc69f281dd2ab8. Commit contained incomplete work.
* closeGravatar Joey Hess2016-12-22
|
* fix build with old ghcGravatar Joey Hess2016-12-10
|
* avoid exposing auth tokens in debugGravatar Joey Hess2016-12-09
|
* debug dump P2P messagesGravatar Joey Hess2016-12-09
|
* git-annex-shell, remotedaemon, git remote: Fix some memory DOS attacks.Gravatar Joey Hess2016-12-09
| | | | | | | | | | | | | | | | | | | | | The attacker could just send a very lot of data, with no \n and it would all be buffered in memory until the kernel killed git-annex or perhaps OOM killed some other more valuable process. This is a low impact security hole, only affecting communication between local git-annex and git-annex-shell on the remote system. (With either able to be the attacker). Only those with the right ssh key can do it. And, there are probably lots of ways to construct git repositories that make git use a lot of memory in various ways, which would have similar impact as this attack. The fix in P2P/IO.hs would have been higher impact, if it had made it to a released version, since it would have allowed DOSing the tor hidden service without needing to authenticate. (The LockContent and NotifyChanges instances may not be really exploitable; since the line is read and ignored, it probably gets read lazily and does not end up staying buffered in memory.)
* convert P2P runners from Maybe to Either StringGravatar Joey Hess2016-12-08
| | | | | | So we get some useful error messages when things fail. This commit was sponsored by Peter Hogg on Patreon.
* fix laziness problem in git relayingGravatar Joey Hess2016-12-08
| | | | | | | | The switch to hGetMetered subtly changed the laziness of how DATA was read, and broke git protocol relaying. Fix by sending received data to the git process's stdin immediately, which ensures that the lazy bytestring is all read from the peer before going on to process the next message from the peer.
* more p2p progress metersGravatar Joey Hess2016-12-07
| | | | | | | | | Display progress meter on send and receive from remote. Added a new hGetMetered that can read an exact number of bytes (or less), updating a meter as it goes. This commit was sponsored by Andreas on Patreon.
* update progress meter when sending to p2p remoteGravatar Joey Hess2016-12-07
| | | | This commit was sponsored by Thom May on Patreon.
* need to auth with the peerGravatar Joey Hess2016-12-06
|
* refactorGravatar Joey Hess2016-12-06
|
* catch non-IO exceptions tooGravatar Joey Hess2016-12-02
|
* make sure that the specified number of bytes of DATA are always sentGravatar Joey Hess2016-12-02
| | | | | | | It's possible, in direct or thin mode, that an object file gets truncated or appended to as it's being sent. This would break the protocol badly, so make sure never to send too many bytes, and to close the protocol connection if too few bytes are available.
* cleanupsGravatar Joey Hess2016-12-01
|
* more flexible types for Proto runnersGravatar Joey Hess2016-12-01
| | | | This will allow a runner in the Annex monad.
* better commentsGravatar Joey Hess2016-11-30
|
* actually check p2p authtokens for tor connectionsGravatar Joey Hess2016-11-30
| | | | This commit was sponsored by Ethan Aubin.
* fix buildGravatar Joey Hess2016-11-24
|
* reorgGravatar Joey Hess2016-11-22