CI to automate build of cargo lockfiles on different Alpine releases for git-annex aports https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/git-annex
Find a file
Joey Hess 3ece4758c6
fix Arbitrary AssociatedFile
Empty filenames were already filtered out as not allowed. But before
the change to ByteString, a NUL could appear in an Arbitrary String,
and so Arbitrary AssociatedFile sometimes generated illegal filenames,
as NUL never appears in a filename. The change to ByteString meant the
String was run through toRawFilePath, which assumes a filename never
contains a NUL. That truncated the String at the NUL, which could
result in an AssociatedFile being generated with an empty filename.

The filtering of NUL added here is not really necessary, because
of the truncation, but it makes explicit that NUL is not allowed.
The real fix is that the suchThat now applies to the final
AssociatedFile, so will catch any empty ones however generated.

This raises the more general question of whether toRawFilePath might
truncate other strings that later get used as filenames. I think new
bugs probably won't be introduced by that. Before, a FilePath that got
read from somewhere (eg an attacker) and contained a NUL would perhaps
be printed out by git-annex, including the NUL, or written to disk
inside a file, or what have you. But as soon as that FilePath gets
passed to any IO action that treats it as a filename, it gets truncated
after the NUL. Eg, writeFile "foo\NULbar" "bar" writes to file "foo".
Now toRawFilePath will make the truncation happen earler, but at most
this will affect what gets printed out or is written to disk inside a
file; actually using the RawFilePath as a filename will not change from
using the FilePath as a filename.
2019-12-06 12:57:41 -04:00
Annex all commands building except for assistant 2019-12-05 14:41:18 -04:00
Assistant everything is building again 2019-12-05 15:10:23 -04:00
Backend wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
Build fix build after Utility.Url changes 2019-11-14 22:25:06 -04:00
CmdLine all commands building except for assistant 2019-12-05 14:41:18 -04:00
Command everything is building again 2019-12-05 15:10:23 -04:00
Config include git-annex-shell back in 2019-12-02 11:51:52 -04:00
Database wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
debian (Build-)depend on git >= 2.22 to avoid memory leaked git being bundled or used 2019-11-22 13:56:18 -04:00
doc Merge branch 'master' into bs 2019-12-05 11:41:30 -04:00
Git add back lost filtering of multibyte chars in prop_encode_decode_roundtrip 2019-12-06 12:14:55 -04:00
Limit wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
Logs all commands building except for assistant 2019-12-05 14:41:18 -04:00
Messages wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
P2P wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
Remote all commands building except for assistant 2019-12-05 14:41:18 -04:00
RemoteDaemon use fromRepo 2019-11-12 10:32:14 -04:00
standalone fix GIT_EXEC_PATH to point to bundle/git-core 2019-11-14 19:20:28 -04:00
static Revert "remove newlines from static js and css" 2014-06-13 02:20:39 -04:00
templates cache the serialization of a Key 2019-11-22 17:49:16 -04:00
Test all commands building except for assistant 2019-12-05 14:41:18 -04:00
Types all commands building except for assistant 2019-12-05 14:41:18 -04:00
Upgrade all commands building except for assistant 2019-12-05 14:41:18 -04:00
Utility reword comment 2019-11-27 16:38:18 -04:00
.ghci avoid ghci warning on tabs 2019-01-21 12:35:44 -04:00
.gitattributes update changelog location 2016-08-22 23:54:11 -04:00
.gitignore Removed Esqueleto as a dependency. 2018-11-06 22:18:55 +00:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs optimisation 2019-12-04 14:30:22 -04:00
Assistant.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Backend.hs cache the serialization of a Key 2019-11-22 17:49:16 -04:00
bash-completion.bash bash completion fix 2018-11-12 13:23:05 -04:00
Benchmark.hs new improved benchmark command that can benchmark anything git-annex does 2019-01-04 13:46:36 -04:00
build.bat let build.bat also be run from cygwin terminal 2015-04-21 14:12:14 -04:00
BuildFlags.hs Drop support for building with aws older than 0.14. 2019-04-19 14:27:59 -04:00
BuildInfo.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CHANGELOG mention optimisations 2019-12-05 11:46:55 -04:00
CmdLine.hs get rid of implicitMessages state 2019-06-12 14:01:41 -04:00
Command.hs remove most remnants of direct mode 2019-08-26 16:27:48 -04:00
Common.hs import Utility.FileSystemEncoding in Common 2019-01-03 11:37:02 -04:00
Config.hs all commands building except for assistant 2019-12-05 14:41:18 -04:00
COPYRIGHT add entry for special remote example scripts which are GPL-3+ 2019-09-27 11:14:48 -04:00
Creds.hs rename RemoteConfigKey to RemoteConfigField 2019-10-10 15:44:05 -04:00
Crypto.hs cache the serialization of a Key 2019-11-22 17:49:16 -04:00
ghci avoid tab warnings from ghc 8 2016-11-17 13:39:30 -04:00
git-annex.cabal all commands building except for assistant 2019-12-05 14:41:18 -04:00
git-annex.hs include git-annex-shell back in 2019-12-02 11:51:52 -04:00
git-union-merge.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Git.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Jenkinsfile Revert "debugging strange old version of git-annex in windows installer bundle" 2017-10-26 11:32:04 -04:00
Key.hs fix Arbitrary AssociatedFile 2019-12-06 12:57:41 -04:00
Limit.hs wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
Logs.hs wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
Makefile remove thing I never meant to commit 2019-11-14 16:11:58 -04:00
Messages.hs wip RawFilePath 2x git-annex find speedup 2019-11-26 16:01:58 -04:00
NEWS remove UNRELEASED marker 2019-11-07 13:20:28 -04:00
README use https 2014-11-06 14:20:10 -04:00
Remote.hs all commands building except for assistant 2019-12-05 14:41:18 -04:00
Setup.hs Added git-remote-tor-annex, which allows git pull and push to the tor hidden service. 2016-11-21 17:27:38 -04:00
stack-lts-12.14.yaml add stack-lts-12.14.yaml 2019-07-09 11:31:43 -04:00
stack.yaml revert unncessary changes 2019-12-02 10:55:11 -04:00
Test.hs all commands building except for assistant 2019-12-05 14:41:18 -04:00
Types.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Upgrade.hs include upgrade code back in 2019-12-02 12:16:46 -04:00

git-annex allows managing files with git, without checking the file
contents into git. While that may seem paradoxical, it is useful when
dealing with files larger than git can currently easily handle, whether due
to limitations in memory, checksumming time, or disk space.

For documentation, see doc/ or <https://git-annex.branchable.com/>