aboutsummaryrefslogtreecommitdiff
path: root/Utility/Base64.hs
Commit message (Collapse)AuthorAge
* avoid throwing exception when String is not encoded using the filesystem ↵Gravatar Joey Hess2015-08-12
| | | | | | | | encoding Since _encodeFilePath generates a String that doesn't use the filesystem encoding, when this exception is caught, we know we already have such a String, and can just return it as-is.
* fix test suite fail in LANG=CGravatar Joey Hess2015-08-12
| | | | | | | | | | | | This was caused by 88aeb849f620a13da47508045daae461a223c997 an Arbitrary String is not necessarily encoded using the filesystem encoding, and in a non-utf8 locale, encodeBS throws an exception on such a string. All I could think to do is limit test data to ascii. This shouldn't be a problem in practice, because the all Strings in git-annex that are not generated by Arbitrary should be loaded in a way that does apply the filesystem encoding.
* Fix setting/setting/viewing metadata that contains unicode or other special ↵Gravatar Joey Hess2015-08-11
| | | | | | | | | | | | | | | | | characters, when in a non-unicode locale. Oh boy, not again. So, another place that the filesystem encoding needs to be applied. Yay. In passing, I changed decodeBS so if a NUL is embedded in the input, the resulting FilePath doesn't get truncated at that NUL. This was needed to make prop_b64_roundtrips pass, and on reviewing the callers of decodeBS, I didn't see any where this wouldn't make sense. When a FilePath is used to operate on the filesystem, it'll get truncated at a NUL anyway, whereas if a String is being used for something else, it might conceivably have a NUL in it, and we wouldn't want it to get truncated when going through decodeBS. (NB: There may be a speed impact from this change.)
* Replace dataenc with sandi.Gravatar Magnus Therning2015-05-07
| | | | | | The library dataenc is unmaintained and has been superseded by sandi. Signed-off-by: Magnus Therning <magnus@therning.org>
* metadata: Fix encoding problem that led to mojibake when storing metadata ↵Gravatar Joey Hess2015-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | strings that contained both unicode characters and a space (or '!') character. The fix is to stop using w82s, which does not properly reconstitute unicode strings. Instrad, use utf8 bytestring to get the [Word8] to base64. This passes unicode through perfectly, including any invalid filesystem encoded characters. Note that toB64 / fromB64 are also used for creds and cipher embedding. It would be unfortunate if this change broke those uses. For cipher embedding, note that ciphers can contain arbitrary bytes (should really be using ByteString.Char8 there). Testing indicated it's not safe to use the new fromB64 there; I think that characters were incorrectly combined. For credpair embedding, the username or password could contain unicode. Before, that unicode would fail to round-trip through the b64. So, I guess this is not going to break any embedded creds that worked before. This bug may have affected some creds before, and if so, this change will not fix old ones, but should fix new ones at least.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* relicense general utility library code to BSDGravatar Joey Hess2014-05-10
| | | | | Omitted a couple of files what have had significant contributions from others.
* allow to build when sandi is installed (don't use it yet)Gravatar Joey Hess2013-11-11
|
* tag xmpp pushes with jidGravatar Joey Hess2013-03-06
| | | | | | | | | | This fixes the issue mentioned in the last commit. Turns out just collecting UUID of clients behind a XMPP remote is insufficient (although I should probably still do it for other reasons), because a single remote repo might be connected via both XMPP and local pairing. So a way is needed to know when a push was received from any client using a given XMPP remote over XMPP, as opposed to via ssh.
* finished where indentation changesGravatar Joey Hess2012-12-13
|
* renameGravatar Joey Hess2011-07-05