summaryrefslogtreecommitdiff
path: root/Utility
Commit message (Collapse)AuthorAge
...
* fix windows buildGravatar Joey Hess2016-12-30
|
* fix windows buildGravatar Joey Hess2016-12-30
|
* fix build with old ghcGravatar Joey Hess2016-12-30
|
* make this build under windowsGravatar Joey Hess2016-12-30
|
* improve description of password promptingGravatar Joey Hess2016-12-28
| | | | | | | | | Since the user does not know whether it will run su or sudo, indicate whether the password prompt will be for root or the user's password, when possible. I assume that programs like gksu that can prompt for either depending on system setup will make clear in their prompt what they're asking for.
* Support all common locations of the torrc file.Gravatar Joey Hess2016-12-28
|
* fix windows buildGravatar Joey Hess2016-12-28
|
* Merge branch 'no-xmpp'Gravatar Joey Hess2016-12-28
|\
* | whitespaceGravatar Joey Hess2016-12-28
| |
| * avoid leaving MVar emptyGravatar Joey Hess2016-12-27
| | | | | | | | Something might want to observe the code multiple times.
| * webapp: check that tor and magic wormhole are installedGravatar Joey Hess2016-12-24
| |
| * cleanupGravatar Joey Hess2016-12-24
|/
* 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!
* really fix su commandGravatar Joey Hess2016-12-24
|
* fix su paramsGravatar Joey Hess2016-12-24
|
* include tor-annex in hidden service directory namesGravatar Joey Hess2016-12-21
| | | | | | To make it easier to manage/delete them etc. Backwards compatablity is preserved for existing tor configs.
* cleanupGravatar Joey Hess2016-12-20
|
* enable-tor: No longer needs to be run as root.Gravatar Joey Hess2016-12-20
| | | | | | When run by not root, su's to root automatically. This commit was sponsored by Brock Spratlen on Patreon.
* relocate tor socket out of /etcGravatar Joey Hess2016-12-20
| | | | | | | | | | | | | weasel explained that apparmor limits on what files tor can read do not apply to sockets (because they're not files). And apparently the problems I was seeing with hidden services not being accessible had to do with onion address propigation and not the location of the socket file. remotedaemon looks up the HiddenServicePort in torrc, so if it was previously configured with the socket in /etc, that will still work. This commit was sponsored by Denis Dzyubenko on Patreon.
* Fix build with directory-1.3.Gravatar Joey Hess2016-12-20
| | | | See https://github.com/haskell/directory/issues/66
* typoGravatar Joey Hess2016-12-18
|
* check if wormhole is installedGravatar Joey Hess2016-12-18
|
* p2p --pair with magic wormhole (untested)Gravatar Joey Hess2016-12-18
| | | | | | It builds. I have not tried to run it yet. :) This commit was sponsored by Jake Vosloo on Patreon.
* make sure False is returned on errorGravatar Joey Hess2016-12-17
|
* improve typesGravatar Joey Hess2016-12-17
|
* document a minor problemGravatar Joey Hess2016-12-17
|
* use PYTHONUNBUFFERED to force python to use sane stdout bufferingGravatar Joey Hess2016-12-17
| | | | | | | | | Works around https://github.com/warner/magic-wormhole/issues/108 See http://stackoverflow.com/questions/107705/disable-output-buffering for the gory details. Why a scripting language would chose a default stdout buffering that differs between terminal and piped output, and tends to introduce this kind of bug, I don't know.
* magic wormhole moduleGravatar Joey Hess2016-12-17
| | | | | | | | | | | | | | | | | | | This interacts with it using stdio, which is surprisingly hard. sendFile does not currently work, due to https://github.com/warner/magic-wormhole/issues/108 Parsing the output to find the magic code is done as robustly as possible, and should continue to work unless wormhole radically changes the format of its codes. Presumably it will never output something that looks like a wormhole code before the actual wormhole code; that would also break this. It would be better if there was a way to make wormhole not mix the code with other output, as requested in https://github.com/warner/magic-wormhole/issues/104 Only exchange of files/directories is supported. To exchange messages, https://github.com/warner/magic-wormhole/issues/99 would need to be resolved. I don't need message exchange however.
* Pass annex.web-options to wget and curl after other options, so that eg ↵Gravatar Joey Hess2016-12-13
| | | | --no-show-progress can be set by the user to disable the default --show-progress.
* Remove http-conduit (<2.2.0) constraintGravatar Alper Nebi Yasak2016-12-10
| | | | | | | | | | Since https://github.com/aristidb/aws/issues/206 is resolved, this constraint is no longer necessary. However, http-conduit (>=2.2.0) requires http-client (>=0.5.0) which introduces some breaking changes. This commit also implements those changes depending on the version. Fixes: https://git-annex.branchable.com/bugs/Build_with_aws_head_fails/ Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
* 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.)
* force sofar calculationGravatar Joey Hess2016-12-08
| | | | | This could avoid a memory leak. It would only happen when the meter didn't look at sofar.
* 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.
* cleanupGravatar Joey Hess2016-11-29
|
* finish git-annex enable-torGravatar Joey Hess2016-11-29
| | | | | Make it stash the address away for git-annex p2p to use later, rather than outputting it. And, look up the UUID itself.
* move tor hidden service socket to /etc, temporarily violating the FHSGravatar Joey Hess2016-11-29
| | | | | | | On Debian, apparmor prevents tor from reading from most locations. And, it silently fails if it is prevented from reading the hidden service socket. I filed #846275 about this; violating the FHS is the least bad of a bad set of choices until that bug is fixed.
* unified AuthToken type between webapp and torGravatar Joey Hess2016-11-22
|
* pull/push over tor working nowGravatar Joey Hess2016-11-21
| | | | | | | | | | | | | | Still a couple bugs: * Closing the connection to the server leaves git upload-pack / receive-pack running, which could be used to DOS. * Sometimes the data is transferred, but it fails at the end, sometimes with: git-remote-tor-annex: <socket: 10>: commitBuffer: resource vanished (Broken pipe) Must be a race condition around shutdown.
* Added git-remote-tor-annex, which allows git pull and push to the tor hidden ↵Gravatar Joey Hess2016-11-21
| | | | | | | | | | | service. Almost working, but there's a bug in the relaying. Also, made tor hidden service setup pick a random port, to make it harder to port scan. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
* remotedaemon: serve tor hidden serviceGravatar Joey Hess2016-11-20
|
* extend p2p protocol to support gitremote-helpers connectGravatar Joey Hess2016-11-19
| | | | | | | | A bit tricky since Proto doesn't support threads. Rather than adding threading support to it, ended up using a callback that waits for both data on a Handle, and incoming messages at the same time. This commit was sponsored by Denis Dzyubenko on Patreon.
* implementation of peer-to-peer protocolGravatar Joey Hess2016-11-17
| | | | | | | | | | | | | | | | For use with tor hidden services, and perhaps other transports later. Based on Utility.SimpleProtocol, it's a line-based protocol, interspersed with transfers of bytestrings of a specified size. Implementation of the local and remote sides of the protocol is done using a free monad. This lets monadic code be included here, without tying it to any particular way to get bytes peer-to-peer. This adds a dependency on the haskell package "free", although that was probably pulled in transitively from other dependencies already. This commit was sponsored by Jeff Goeke-Smith on Patreon.
* Merge branch 'master' into torGravatar Joey Hess2016-11-17
|\
| * allow Utility.Exception to still be used when not building with cabalGravatar Joey Hess2016-11-15
| |
| * Avoid backtraces on expected failures when built with ghc 8; only use ↵Gravatar Joey Hess2016-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | backtraces for unexpected errors. ghc 8 added backtraces on uncaught errors. This is great, but git-annex was using error in many places for a error message targeted at the user, in some known problem case. A backtrace only confuses such a message, so omit it. Notably, commands like git annex drop that failed due to eg, numcopies, used to use error, so had a backtrace. This commit was sponsored by Ethan Aubin.
* | use socket for tor hidden serviceGravatar Joey Hess2016-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids needing to bind to the right port before something else does. The socket is in /var/run/user/$uid/ which ought to be writable by only that uid. At least it is on linux systems using systemd. For Windows, may need to revisit this and use ports or something. The first version of tor to support sockets for hidden services was 0.2.6.3. That is not in Debian stable, but is available in backports. This commit was sponsored by andrea rota.
* | git-annex enable-tor commandGravatar Joey Hess2016-11-14
|/ | | | | | | | | | | | | | | | | | Tor unfortunately does not come out of the box configured to let hidden services register themselves on the fly via the ControlPort. And, changing the config to enable the ControlPort and a particular type of auth for it may break something already using the ControlPort, or lessen the security of the system. So, this leaves only one option to us: Add a hidden service to the torrc. git-annex enable-tor does so, and picks an unused high port for tor to listen on for connections to the hidden service. It's up to the caller to somehow pick a local port to listen on that won't be used by something else. That may be difficult to do.. This commit was sponsored by Jochen Bartl on Patreon.
* webapp: Explicitly avoid checking for auth in static subsite requests.Gravatar Joey Hess2016-11-10
| | | | | | | | Yesod didn't used to do auth checks for that, but this may have changed. I don't have a way to reproduce the reported problem yet, but this change certianly won't hurt anything. This commit was sponsored by Thom May on Patreon.
* restart coprocess in raw modeGravatar Joey Hess2016-11-01
| | | | | | | | | | | Restarting a crashing git process could result in filename encoding issues when not in a unicode locale, as the restarted processes's handles were not read in raw mode. Since rawMode is always used when starting a coprocess, didn't bother to parameterise it and just always enable it for simplicity. This commit was sponsored by Jake Vosloo on Patreon.