Commit Graph

68 Commits (cee447066f05808d8777aa1a097eecb8fdb0054b)

Author SHA1 Message Date
leitner ca968b8cec also escape negative chars (we are in utf-8 land now, no longer latin1)
leitner 03feeb7ef2 make check can now run in parallel
leitner 4f66a05d0b remove some warnings in unit tests
catch impossible buffer in bs_init_membuf
leitner 7ce1c93d0f add "make check" target and make it work :)
leitner 19c65ab54f fix two complaints by clang's static analyzer
leitner dc69bc24ec escape </script> in fmt_jsonescape
leitner dbd1f990c8 be less restrictive (RFC says NUL CR and LF need to be escaped)
leitner 708e34ab7f don't escape poop emoji (emit as utf8 instead)
if input is not valid utf8, encode each invalid byte as utf8 in output
leitner 2aceb52138 remove warning
leitner 5a803f3e7c update man pages
leitner 928da70f1d add man pages for scan_urlencoded*
leitner 42a78bb04e man page and unit tests for scan_hexdump
leitner c8156a9841 add man page and unit tests for scan_base64url
leitner 8d449d442b don't write one more byte in error case
leitner 527e2e7c5b add unit tests and man page for scan_ldapescape
leitner ac2df2bf20 bring scan_cescape up to speed
leitner 8526ae3d0d fix utf-8 json encoding for outside basic multilingual plane
leitner 84d3e6a7b4 fmt_jsonescape: convert utf-8 >ffff to \u escaped surrogate pair
leitner b9eb81c58f move unit tests into each file (compile with -DUNITTEST)
leitner 760598ec2f #include <foo.h> -> #include <libowfat/foo.h>
leitner dba47741bf remove new compiler warnings from gcc 7
leitner 660c314341 a few more test suites
escapecharc now supports non-ascii
leitner e89f098743 remove signedness warnings
leitner ce64436772 document scan_uuencoded
leitner 959151a24d add man page for scan_base64, handle partial blocks better
leitner 41db97d380 improve json escape decoder, add test suite
leitner 3c68ae0dcc scan_jsonescape ends when it sees an unescaped "
leitner c493b262ac handle \n etc
leitner 26a193bff0 - and _ are also safe characters
leitner d26b8082d8 shut up new gcc 6 warnings
leitner 7f829a36bc add base64url support
leitner fce165fdcb remove dead store
leitner 8bdf66a1f5 add scan_html_tagarg
leitner 1d723c8da4 scan_html forgot to output '<' when it did not know the tag coming in
leitner 0aa50a19a4 add fmt_html_tagarg, fmt_xml
leitner 35942878c2 $ make WERROR=-Werror now builds with -Werror
add some single char escaping routines to fmt.h
pull in html5 entities from w3c and use those to do a proper scan_html decoding
fix an off-by-one in fmt_to_array
add a ton of unit tests for the fmt routines
leitner fb5bd841a8 | not +
leitner 1d2add208f add json encoding routines to textcode
leitner f28b0ee6b2 add fmt_ldapescape2
leitner e0a6a1cb84 try to catch malicious input in textcode fmt_* functions
leitner 1b17f47def escape more in fmt_ldapescape
leitner 3004b518ef switch to size_t and ssize_t
leitner d361d81c64 make socket_(tc|ud)p[46] actually return non-blocking sockets as
documented (Richard Lyons)
leitner 0a47d9ea13 fix scan_to_sa (Tim Lorenz)
leitner 828aa295f1 optimize fmt_base64 (Dan Gundlach)
leitner 60f3320ae0 allow specifying more characters to encode for subset encoders (for
example, you can say that fmt_quotedprintable should also escape ':', if
you want to use ':' as separator in a data file.
leitner f7809e36df scan_urlencoded2 is like scan_urlencoded, but it will not decode '+' in urls
leitner f52aa87441 more alloca fixes
leitner 60d00ede11 remove some warnings
leitner 3279ca84f8 don't use black list for urlencoding, use white list.