Commit graph

32829 commits

Author SHA1 Message Date
xloem
59aa498876 Added a comment 2023-04-11 18:07:04 +00:00
xloem
893cd20bee Added a comment 2023-04-11 18:03:26 +00:00
Joey Hess
a0e6fa18eb
eliminate showStart showStartOther
These were not handling control characters and are redundant.

Sponsored-by: Jack Hill on Patreon
2023-04-10 16:28:58 -04:00
Joey Hess
3290a09a70
filter out control characters in warning messages
Converted warning and similar to use StringContainingQuotedPath. Most
warnings are static strings, some do refer to filepaths that need to be
quoted, and others don't need quoting.

Note that, since quote filters out control characters of even
UnquotedString, this makes all warnings safe, even when an attacker
sneaks in a control character in some other way.

When json is being output, no quoting is done, since json gets its own
quoting.

This does, as a side effect, make warning messages in json output not
be indented. The indentation is only needed to offset warning messages
underneath the display of the file they apply to, so that's ok.

Sponsored-by: Brett Eisenberg on Patreon
2023-04-10 15:55:44 -04:00
Joey Hess
cd544e548b
filter out control characters in error messages
giveup changed to filter out control characters. (It is too low level to
make it use StringContainingQuotedPath.)

error still does not, but it should only be used for internal errors,
where the message is not attacker-controlled.

Changed a lot of existing error to giveup when it is not strictly an
internal error.

Of course, other exceptions can still be thrown, either by code in
git-annex, or a library, that include some attacker-controlled value.
This does not guard against those.

Sponsored-by: Noam Kremen on Patreon
2023-04-10 13:50:51 -04:00
Joey Hess
da83652c76
addurl --preserve-filename: reject control characters
As well as escape sequences, control characters seem unlikely to be desired when
doing addurl, and likely to trip someone up. So disallow them as well.

I did consider going the other way and allowing filenames with control characters
and escape sequences, since git-annex is in the process of escaping display
of all filenames. Might still be a better idea?

Also display the illegal filename git quoted when it rejects it.

Sponsored-by: Nicholas Golder-Manning on Patreon
2023-04-10 12:18:25 -04:00
Joey Hess
2ba1559a8e
git style quoting for ActionItemOther
Added StringContainingQuotedPath, which is used for ActionItemOther.

In the process, checked every ActionItemOther for those containing
filenames, and made them use quoting.

Sponsored-by: Graham Spencer on Patreon
2023-04-08 16:30:01 -04:00
Joey Hess
c5b017e55b
full emulation of git filename escaping
Not yet used, but the plan is to make git-annex use this when displaying
filenames similar to how git does.

Sponsored-by: Lawrence Brogan on Patreon
2023-04-07 17:17:31 -04:00
Joey Hess
f0b1034f8f
add news item for git-annex 10.20230407 2023-04-07 13:37:18 -04:00
Joey Hess
218cb6ab56
expand 2023-04-07 13:13:16 -04:00
Joey Hess
e6a4782b0c
response 2023-04-07 13:00:56 -04:00
Joey Hess
b4e5f2b8a4
response 2023-04-07 12:52:43 -04:00
Joey Hess
868eb44562
Merge branch 'master' of ssh://git-annex.branchable.com 2023-04-07 12:42:09 -04:00
jwodder
b8afb79ada 2023-04-07 15:19:04 +00:00
mih
c83a783f45 Added a comment: Status of the import/export protocol implementation 2023-04-07 09:17:22 +00:00
Joey Hess
c417336fbb
todo 2023-04-05 19:37:21 -04:00
Joey Hess
98a3ba0ea5
restore old registerurl location tracking behavior
registerurl: When an url is claimed by a special remote other than the web,
update location tracking for that special remote.

registerurl's behavior was changed in commit
451171b7c1, apparently accidentially to not
update location tracking except for the web.

This makes registerurl followed by unregisterurl not be a no-op, when the
url happens to be claimed by a remote other than the web. It is a noop when
the url is unclaimed except by the web. I don't like the inconsistency,
and wish that registerurl and unregisterurl never updated location
tracking, which would be more in keeping with them being plumbing.

But there is the fact that it used to behave this way, and also it was
inconsistent that it updated location tracking for the web but not for
other remotes, unlike addurl. And there's an argument that the user might
not know what remote to expect to claim an url, so would be considerably in
the dark when using registerurl. (Although they have to know what content
gets downloaded, since they specify a key..)

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-04-05 17:06:44 -04:00
Joey Hess
26a094ac1a
hm 2023-04-05 16:36:18 -04:00
Joey Hess
eecd02fd3d
Merge branch 'master' of ssh://git-annex.branchable.com 2023-04-05 15:56:31 -04:00
Joey Hess
2b940f7725
registerurl, unregisterurl: Added --remote option
This serves two purposes. --remote=web bypasses other special remotes that
claim the url, same as addurl --raw. And, specifying some other remote
allows making sure that an url is claimed by the remote you expect,
which makes then using setpresentkey not be fragile.

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
2023-04-05 15:54:41 -04:00
yarikoptic
1751ddd759 Added a comment 2023-04-05 19:36:41 +00:00
Joey Hess
c39d72ac78
comments 2023-04-05 15:00:39 -04:00
Joey Hess
06c584a267
Merge branch 'master' of ssh://git-annex.branchable.com 2023-04-05 11:04:55 -04:00
Joey Hess
1780b657bc
update 2023-04-05 11:04:35 -04:00
jkniiv
247430a272 Added a comment 2023-04-05 09:42:12 +00:00
yarikoptic
e4c93a233e Added a comment 2023-04-05 01:03:38 +00:00
yarikoptic
25bdb45b72 Added a comment 2023-04-05 00:30:00 +00:00
yarikoptic
352a274f53 Added a comment 2023-04-04 20:15:59 +00:00
Joey Hess
d0e94b4302
fixed 2023-04-04 15:19:25 -04:00
Joey Hess
68a0491f83
comment 2023-04-04 14:43:33 -04:00
Joey Hess
4e64af0010
comment 2023-04-04 14:31:25 -04:00
Joey Hess
31ffb0f216
probably fixed but I didn't actually reproduce it 2023-04-04 14:25:55 -04:00
Joey Hess
e37b968383
comment 2023-04-04 14:09:02 -04:00
Joey Hess
bac1a990a6
comments 2023-04-04 13:52:23 -04:00
Joey Hess
c3eaecb244
comment 2023-04-04 13:34:32 -04:00
jkniiv
4a5b5bdd0d Added a comment: happens during sync too 2023-04-03 11:48:10 +00:00
gioele@678b7c03f524f2669b179b603f65352fcc16774e
dfb5826be2 2023-04-03 09:05:45 +00:00
gioele@678b7c03f524f2669b179b603f65352fcc16774e
f9d24e92a0 Added a comment 2023-04-01 11:09:49 +00:00
gioele@678b7c03f524f2669b179b603f65352fcc16774e
170c5edb44 Added a comment 2023-04-01 11:06:26 +00:00
wolf480@8ad1ccdd08efc303a88f7e88c4e629be6637a44e
71e0ec2901 Added a comment 2023-04-01 07:23:18 +00:00
yarikoptic
45eaf8e484 reporting an annoying registerurl issue not registering a URL 2023-03-31 22:36:02 +00:00
yarikoptic
d9549d4744 initial todo for adding --remote to registerurl 2023-03-31 22:15:26 +00:00
gioele@678b7c03f524f2669b179b603f65352fcc16774e
f74a3d1e59 Added a comment 2023-03-31 20:16:04 +00:00
Joey Hess
88ea10f606
Merge branch 'master' of ssh://git-annex.branchable.com 2023-03-31 15:16:28 -04:00
Joey Hess
cc36c8516a
Sped up sqlite inserts 2x when built with persistent 2.14.5.0
https://github.com/yesodweb/persistent/issues/1457

Sponsored-by: Dartmouth College's DANDI project
2023-03-31 14:38:25 -04:00
zhongruoyu@80ae9772857666624009364c29f07c70beed46ac
8119f22344 Added a comment 2023-03-31 18:32:29 +00:00
Joey Hess
a858099272
clarify 2023-03-31 14:18:50 -04:00
Joey Hess
8047df62cc
fix link 2023-03-31 14:18:36 -04:00
Joey Hess
f2914ab6a0
idea 2023-03-31 13:11:35 -04:00
Joey Hess
2b40fa51d3
git-annex.cabal: Prevent building with unix-compat 0.7
Which removed System.PosixCompat.User.
See https://github.com/haskell-pkg-janitors/unix-compat/issues/3

Sponsored-by: Noam Kremen on Patreon
2023-03-31 12:52:23 -04:00