Project: Redis (App Definition and Development / Database)
File: CHANGELOG.md

Announcing Hiredis v1.2.0 with with new adapters, and a great many bug fixes. Add sdevent adapter @Oipo (#1144) Allow specifying the keepalive interval @michael-grunder (#1168) Add RedisModule adapter @tezc (#1182) Helper for setting TCPUSERTIMEOUT socket option @zuiderkwast (#1188) Fix a typo in b6a052f. @yossigo (#1190) Fix wincrypt symbols conflict @hudayou (#1151) Don't attempt to set a timeout if we are in an error state. @michael-grunder (#1180) Accept -nan per the RESP3 spec recommendation. @michael-grunder (#1178) Fix colliding option values @zuiderkwast (#1172) Ensure functionality without `MSCVER` definition @windyakin (#1194) Add a test for the TCPUSERTIMEOUT option. @michael-grunder (#1192) Add -Werror as a default. @yossigo (#1193) CI: Update homebrew Redis version. @yossigo (#1191) Fix typo in makefile. @michael-grunder (#1179) Write a version file for the CMake package @Neverlord (#1165) CMakeLists.txt: respect BUILDSHAREDLIBS @ffontaine (#1147) Cmake static or shared @autoantwort (#1160) fix typo @tillkruss (#1153) Add a test ensuring we don't clobber connection error. @michael-grunder (#1181) Search for openssl on macOS @michael-grunder (#1169) We'd like to thank all the contributors who worked on this release! <a href="https://github.com/neverlord"><img src="https://github.com/neverlord.png" width="32" height="32"></a> <a href="https://github.com/Oipo"><img src="https://github.com/Oipo.png" width="32" height="32"></a> <a href="https://github.com/autoantwort"><img src="https://github.com/autoantwort.png" width="32" height="32"></a> <a href="https://github.com/ffontaine"><img src="https://github.com/ffontaine.png" width="32" height="32"></a> <a href="https://github.com/hudayou"><img src="https://github.com/hudayou.png" width="32" height="32"></a> <a href="https://github.com/michael-grunder"><img src="https://github.com/michael-grunder.png" width="32" height="32"></a> <a href="https://github.com/postgraph"><img src="https://github.com/postgraph.png" width="32" height="32"></a> <a href="https://github.com/tezc"><img src="https://github.com/tezc.png" width="32" height="32"></a> <a href="https://github.com/tillkruss"><img src="https://github.com/tillkruss.png" width="32" height="32"></a> <a href="https://github.com/vityafx"><img src="https://github.com/vityafx.png" width="32" height="32"></a> <a href="https://github.com/windyakin"><img src="https://github.com/windyakin.png" width="32" height="32"></a> <a href="https://github.com/yossigo"><img src="https://github.com/yossigo.png" width="32" height="32"></a> <a href="https://github.com/zuiderkwast"><img src="https://github.com/zuiderkwast.png" width="32" height="32"></a> Announcing Hiredis v1.1.0 GA with better SSL convenience, new async adapters and a great many bug fixes. NOTE: Hiredis can now return `nan` in addition to `-inf` and `inf` when returning a `REDISREPLYDOUBLE`. Add support for nan in RESP3 double () Add an example that calls redisCommandArgv () fix flag reference () Make freeing a NULL redisAsyncContext a no op. () CI updates ( () We'd like to thank all the contributors who worked on this release! <a href="https://github.com/bjsov"><img src="https://github.com/bjosv.png" width="32" height="32"></a> <a href="https://github.com/filipecosta90"><img src="https://github.com/filipecosta90.png" width="32" height="32"></a> <a href="https://github.com/michael-grunder"><img src="https://github.com/michael-grunder.png" width="32" height="32"></a> <a href="https://github.com/pata00"><img src="https://github.com/pata00.png" width="32" height="32"></a> Announcing Hiredis v1.1.0-rc1, with better SSL convenience, new async adapters, and a great many bug fixes. Add possibility to prefer IPv6, IPv4 or unspecified () Add adapters/libhv () Add timeout support to libhv adapter. () set default SSL verification path () Introduce .close method for redisContextFuncs () Make it possible to set SSL verify mode () Polling adapter and example () Unsubscribe handling in async () Add timeout support for libuv adapter () Update for MinGW cross compile () fixed CPP build error with adapters/libhv.h () Fix protocol error , () Use a windows specific keepalive function. () Fix CMake config path on Linux. () Fix potential fault at createDoubleObject () Fix some undefined behavior () Copy OOM errors to redisAsyncContext when finding subscribe callback () Maintain backward compatibility with our onConnect callback. () Fix PUSH handler tests for Redis >= 7.0.5 () fix heap-buffer-overflow () Fix heap-buffer-overflow issue in redisvFormatCommad () Polling adapter requires sockcompat.h () Illumos test fixes, error message difference for bad hostname test. () Remove semicolon after do-while in \EL\CLEANUP () Stability: Support calling redisAsyncCommand and redisAsyncDisconnect from the onConnected callback () Fix async connect on Windows () Fix tests so they work for Redis 7.0 () Fix warnings on Win64 () Handle push notifications before or after reply. () Update hiredis sds with improvements found in redis () Avoid incorrect call to the previous reply's callback () fix building on AIX and SunOS () Allow sending commands after sending an unsubscribe () Correction for command timeout during pubsub () Fix

compilation for 64-bit Windows () Fix integer overflow when format command larger than 4GB () Handle array response during subscribe in RESP3 () Support PING while subscribing (RESP2) () CI fixes in preparation of release () Add do while(0) (protection for macros ) Fixup of PR734: Coverage of hiredis.c () CMake corrections for building on Windows () Install on windows fixes () Add libhv example to our standard Makefile () Additional include directory given by pkg-config () Use attribute when building with Clang on Windows () Minor refactor () Fix pkgconfig result for hiredis_ssl () Update documentation to explain redisConnectWithOptions. () uvadapter: reduce number of uvpollstart calls () Regression test for off-by-one parsing error () CMake: remove dict.c form hiredis_sources () Do store command timeout in the context for redisSetTimeout (, ) Add GitHub Actions CI workflow for hiredis: Arm, Arm64, 386, windows. () CI: bump macOS runner version () Support for generating release notes () Improve example for SSL initialization in README.md () Fix README typos () fix cmake version () Use the same name for static and shared libraries () Embed debug information in windows static .lib file () Improved async documentation () Use official repository for redis package. () Whitelist hiredis repo path in cygwin () CentOS 8 is EOL, switch to RockyLinux () CMakeLists.txt: allow building without a C++ compiler () Makefile: move SSL options into a block and refine rules () Update CMakeLists.txt for more portability () FreeBSD build fixes + CI () Add asynchronous test for pubsub using RESP3 () Trigger CI failure when Valgrind issues are found () Move to using make directly in Cygwin () Add asynchronous API tests () Correcting the build target `coverage` for enabled SSL () GH Actions: Run SSL tests during CI () GH: Actions - Add valgrind and CMake () Add Centos8 tests in GH Actions () We should run actions on PRs (() Add Cygwin test in GitHub actions () Add Windows tests in GitHub actions () Switch to GitHub actions () Minor refactor of CVE-2021-32765 fix. () Remove extra comma from CMake var. () Add REDIS\OPT\PREFER\_UNSPEC () We'd like to thank all the contributors who worked on this release! <a href="https://github.com/EricDeng1001"><img src="https://github.com/EricDeng1001.png" width="32" height="32"></a> <a href="https://github.com/Lipraxde"><img src="https://github.com/Lipraxde.png" width="32" height="32"></a> <a href="https://github.com/MichaelSuen-thePointer"><img src="https://github.com/MichaelSuen-thePointer.png" width="32" height="32"></a> <a href="https://github.com/SukkaW"><img src="https://github.com/SukkaW.png" width="32" height="32"></a> <a href="https://github.com/adobeturchenko"><img src="https://github.com/adobeturchenko.png" width="32" height="32"></a> <a href="https://github.com/afcidk"><img src="https://github.com/afcidk.png" width="32" height="32"></a> <a href="https://github.com/bit0fun"><img src="https://github.com/bit0fun.png" width="32" height="32"></a> <a href="https://github.com/bjosv"><img src="https://github.com/bjosv.png" width="32" height="32"></a> <a href="https://github.com/bugwz"><img src="https://github.com/bugwz.png" width="32" height="32"></a> <a href="https://github.com/catterer"><img src="https://github.com/catterer.png" width="32" height="32"></a> <a href="https://github.com/chayim"><img src="https://github.com/chayim.png" width="32" height="32"></a> <a href="https://github.com/devnexen"><img src="https://github.com/devnexen.png" width="32" height="32"></a> <a href="https://github.com/ffontaine"><img src="https://github.com/ffontaine.png" width="32" height="32"></a> <a href="https://github.com/ithewei"><img src="https://github.com/ithewei.png" width="32" height="32"></a> <a href="https://github.com/jengab"><img src="https://github.com/jengab.png" width="32" height="32"></a> <a href="https://github.com/kristjanvalur"><img src="https://github.com/kristjanvalur.png" width="32" height="32"></a> <a href="https://github.com/michael-grunder"><img src="https://github.com/michael-grunder.png" width="32" height="32"></a> <a href="https://github.com/noxiouz"><img src="https://github.com/noxiouz.png" width="32" height="32"></a> <a href="https://github.com/mtdxc"><img src="https://github.com/mtdxc.png" width="32" height="32"></a> <a href="https://github.com/orgads"><img src="https://github.com/orgads.png" width="32" height="32"></a> <a href="https://github.com/pbtummillo"><img src="https://github.com/pbtummillo.png" width="32" height="32"></a> <a href="https://github.com/pizhenwei"><img src="https://github.com/pizhenwei.png" width="32" height="32"></a> <a href="https://github.com/scddev"><img src="https://github.com/scddev.png" width="32" height="32"></a> <a href="https://github.com/smmir-cent"><img src="https://github.com/smmir-cent.png" width="32" height="32"></a> <a href="https://github.com/stanhu"><img src="https://github.com/stanhu.png" width="32" height="32"></a> <a href="https://github.com/sundb"><img src="https://github.com/sundb.png" width="32" height="32"></a> <a href="https://github.com/vturchenko"><img src="https://github.com/vturchenko.png" width="32" height="32"></a> <a href="https://github.com/xkszltl"><img src="https://github.com/xkszltl.png" width="32" height="32"></a> <a href="https://github.com/yossigo"><img src="https://github.com/yossigo.png" width="32" height="32"></a> <a href="https://github.com/zhangtaoXT5"><img src="https://github.com/zhangtaoXT5.png" width="32" height="32"></a> <a href="https://github.com/zuiderkwast"><img src="https://github.com/zuiderkwast.png" width="32" height="32"></a> Announcing Hiredis v1.0.2, which fixes CVE-2021-32765 but returns the SONAME to the correct value of `1.0.0`. () <span style="color:red">This release erroneously bumped the SONAME, please use </span> Announcing Hiredis v1.0.1, a security release fixing CVE-2021-32765 Fix for () Thanks to for the security fix and to for finding the bug. :sparkling_heart: Announcing Hiredis

which adds support for RESP3, SSL connections, allocator injection, and better Windows support! :tada: A big thanks to everyone who helped with this release. The following list includes everyone who contributed at least five lines, sorted by lines contributed. :sparkling_heart: , , , , , , , , , , , , , , BREAKING CHANGES: `redisOptions` now has two timeout fields. One for connecting, and one for commands. If you're presently using `options->timeout` you will need to change it to use `options->connect_timeout`. (See ) Bulk and multi-bulk lengths less than -1 or greater than `LLONG_MAX` are now protocol errors. This is consistent with the RESP specification. On 32-bit platforms, the upper bound is lowered to `SIZE_MAX`. `redisReplyObjectFunctions.createArray` now takes `size_t` for its length parameter. New features: Support for RESP3 , , , (, ) Support for SSL connections , , , , , , (, ) Run-time allocator injection () Improved Windows support (including MinGW and Windows CI) , () Adds support for distinct connect and command timeouts , () Add generic pointer and destructor to `redisContext` that users can use for context. () Closed issues (that involved code changes): Makefile does not install TLS libraries redisConnectWithOptions should not set command timeout , () Fix integer overflow in `sdsrange` INFO & CLUSTER commands failed when using RESP3 Windows compatibility patches , , RESP3 PUSH messages incorrectly use pending callback Asynchronous PSUBSCRIBE command fails when using RESP3 New SSL API , Hard-coded limit of nested reply depth Fix TCP_NODELAY in Windows/OSX , , , , Added timers to libev adapter. , Initialization discards const qualifier \ undefined reference to hi_malloc hiredis pkg-config file incorrectly ignores multiarch libdir spec'n Don't use -G to build shared object on Solaris error when make USE\_SSL=1 Allow to change SSL Mode hiredis/adapters/libevent.h memleak redisLibuvPoll crash when server closes the connetion about redisAsyncDisconnect question hiredis adapters libuv error for help API/ABI changes analysis Memory leak patch in Redis Remove the depth limitation Merged pull requests: Move SSL management to a distinct private pointer () Move include to sockcompat.h to maintain style () Remove erroneous tag and add license to push example () fix windows compiling with mingw () Some Windows quality of life improvements. () Use \_WIN32 define instead of WIN32 () Non Linux CI fixes () Resp3 oob push support () fix \#785: defer TCP\_NODELAY in async tcp connections () sdsrange overflow fix () Use explicit pointer casting for c++ compatibility () Document allocator injection and completeness fix in test.c () Use unique names for allocator struct members () New SSL API to replace redisSecureConnection\(\). () Add logic to handle RESP3 push messages () Use standrad isxdigit instead of custom helper function. () Fix missing SSL build/install options. () Add link to ABI tracker () Resp3 verbatim string support () Allow users to replace allocator and handle OOM everywhere. () Remove nested depth limitation. () Attempt to fix compilation on Solaris () Support timeouts in libev adapater () Fix pkgconfig when installing to a custom lib dir () Fix USE\_SSL=1 make/cmake on OSX and CMake tests () Use correct libuv call on Windows () Added CMake package config and fixed hiredis\_ssl on Windows () CMake: Set hiredis\_ssl shared object version. () Win32 tests and timeout fix () Provides an optional cleanup callback for async data. () Housekeeping fixes () install alloc.h () fix spelling mistakes () Free the reply in redisGetReply when passed NULL () Fix dead code in sslLogCallback relating to should\_log variable. () Fix typo in dict.c. () Adding an option to DISABLE\_TESTS () Update README with SSL

() Fixes leaks in unit tests () SSL Tests () SSL Reorganization () Fix MSVC build. () SSL: Properly report SSL\_connect\(\) errors. () Silent SSL trace to stdout by default. () Port RESP3 support from Redis. () Removed whitespace before newline () Add install adapters header files () Remove unnecessary null check before free () redisReaderGetReply leak memory () fix timeout code in windows () test: fix errstr matching for musl libc () Windows: MinGW fixes and Windows Travis builders () The setsockopt and getsockopt API diffs from BSD socket and WSA one () Fix Compile Error On Windows \(Visual Studio\) () Fix NXDOMAIN test case () Add MinGW support () SSL Support () Fix Invalid argument after redisAsyncConnectUnix () Makefile: use predefined AR () FreeBSD build fix () Fix errors not propagating properly with libuv.h. () Update README.md () Fix redisBufferRead documentation () Add CPPFLAGS to REAL\_CFLAGS () Update createArray to take size\_t () fix common realloc mistake and add null check more () Proper error reporting for connect failures () \ This Changelog was automatically generated by * Note: There were no changes to code between v1.0.0-rc1 and v1.0.0 so see v1.0.0 for changelog Adds safe allocation wrappers (CVE-2020-7105, #747, #752) (Michael Grunder) BREAKING CHANGES: Change `redisReply.len` to `size_t`, as it denotes the the size of a string User code should compare this to `size_t` values as well. If it was used to compare to other values, casting might be necessary or can be removed, if casting was applied before. Make string2ll static to fix conflict with Redis (Tom Lee [c3188b]) Use -dynamiclib instead of -shared for OSX (Ryan Schmidt [a65537]) Use string2ll from Redis w/added tests (Michael Grunder [7bef04, 60f622]) Makefile - OSX compilation fixes (Ryan Schmidt [881fcb, 0e9af8]) Remove redundant NULL checks (Justin Brewer [54acc8, 58e6b8]) Fix bulk and multi-bulk length truncation (Justin Brewer [109197]) Fix SIGSEGV in OpenBSD by checking for NULL before calling freeaddrinfo (Justin Brewer [546d94]) Several POSIX compatibility fixes (Justin Brewer [bbeab8, 49bbaa, d1c1b6]) Makefile - Compatibility fixes (Dimitri Vorobiev [3238cf, 12a9d1]) Makefile - Fix make install on FreeBSD (Zach Shipko [a2ef2b]) Makefile - don't assume $(INSTALL) is cp (Igor Gnatenko [725a96]) Separate side-effect causing function from assert and small cleanup (amallia [b46413, 3c3234]) Don't send negative values to `redisAsyncCommand` (Frederik Deweerdt [706129]) Fix leak if setsockopt fails (Frederik Deweerdt [e21c9c]) Fix libevent leak (zfz [515228]) Clean up GCC warning (Ichito Nagata [2ec774]) Keep track of errno in `redisSetErrorFromErrno()` as snprintf may use it (Jin Qing [25cd88]) Solaris compilation fix (Donald Whyte [41b07d]) Reorder linker arguments when building examples (Tustfarm-heart [06eedd]) Keep track of subscriptions in case of rapid subscribe/unsubscribe (Hyungjin Kim [073dc8, be76c5, d46999]) libuv use after free fix (Paul Scott [cbb956]) Properly close socket fd on reconnect attempt (WSL [64d1ec]) Skip valgrind in OSX tests (Jan-Erik Rediger [9deb78]) Various updates for Travis testing OSX (Ted Nyman [fa3774, 16a459, bc0ea5]) Update libevent (Chris Xin [386802]) Change sds.h for building in C++ projects (Ali Volkan ATLI [f5b32e]) Use proper format specifier in redisFormatSdsCommandArgv (Paulino Huerta, Jan-Erik Rediger [360a06, 8655a6]) Better handling of NULL reply in example code (Jan-Erik Rediger [1b8ed3]) Prevent overflow when formatting an error (Jan-Erik Rediger [0335cb]) Compatibility fix for strerror_r (Tom Lee [bb1747]) Properly detect integer parse/overflow errors (Justin Brewer [93421f]) Adds CI for Windows and cygwin fixes (owent, [6c53d6, 6c3e40]) Catch a buffer overflow when formatting the error message Import latest upstream sds. This breaks applications that are linked against the old hiredis v0.13 Fix warnings, when compiled with -Wshadow Make hiredis compile in Cygwin on Windows, now CI-tested Bulk and multi-bulk lengths less than -1 or greater than `LLONG_MAX` are now protocol

This is consistent with the RESP specification. On 32-bit platforms, the upper bound is lowered to `SIZE_MAX`. Remove backwards compatibility macro's This removes the following old function aliases, use the new name now: | Old | New | | | - | | redisReplyReaderCreate | redisReaderCreate | | redisReplyReaderCreate | redisReaderCreate | | redisReplyReaderFree | redisReaderFree | | redisReplyReaderFeed | redisReaderFeed | | redisReplyReaderGetReply | redisReaderGetReply | | redisReplyReaderSetPrivdata | redisReaderSetPrivdata | | redisReplyReaderGetObject | redisReaderGetObject | | redisReplyReaderGetError | redisReaderGetError | The `DEBUG` variable in the Makefile was renamed to `DEBUG_FLAGS` Previously it broke some builds for people that had `DEBUG` set to some arbitrary value, due to debugging other software. By renaming we avoid unintentional name clashes. Simply rename `DEBUG` to `DEBUG_FLAGS` in your environment to make it working again. Revert "Clear `REDIS_CONNECTED` flag when connection is closed". Make tests pass on FreeBSD (Thanks, Giacomo Olgeni) If the `REDIS_CONNECTED` flag is cleared, the async onDisconnect callback function will never be called. This causes problems as the disconnect is never reported back to the user. Prevent crash on pending replies in async code (Thanks, @switch-st) Clear `REDIS_CONNECTED` flag when connection is closed (Thanks, Jerry Jacobs) Add MacOS X addapter (Thanks, @dizzus) Add Qt adapter (Thanks, Pietro Cerutti) Add Ivykis adapter (Thanks, Gergely Nagy) All adapters are provided as is and are only tested where possible. This is a bug fix release. The new `reconnect` method introduced new struct members, which clashed with pre-defined names in pre-C99 code. Another commit forced C99 compilation just to make it work, but of course this is not desirable for outside projects. Other non-C99 code can now use hiredis as usual again. Sorry for the inconvenience. Fix memory leak in async reply handling (Salvatore Sanfilippo) Rename struct member to avoid name clash with pre-c99 code (Alex Balashov, ncopa) This release adds a minimal Windows compatibility layer. The parser, standalone since v0.12.0, can now be compiled on Windows (and thus used in other client libraries as well) Windows compatibility layer for parser code (tzickel) Properly escape data printed to PKGCONF file (Dan Skorupski) Fix tests when assert() undefined (Keith Bennett, Matt Stancliff) Implement a reconnect method for the client context, this changes the structure of `redisContext` (Aaron Bedra) Fix `make install`: DESTDIR support, install all required files, install PKGCONF in proper location Fix `make test` as 32 bit build on 64 bit platform Add optional KeepAlive support Try again on EINTR errors Add libuv adapter Add IPv6 support Remove possibility of multiple close on same fd Add ability to bind source address on connect Add redisConnectFd() and redisFreeKeepFd() Fix getaddrinfo() memory leak Free string if it is unused (fixes memory leak) Improve redisAppendCommandArgv performance 2.5x Add support for SO_REUSEADDR Fix redisvFormatCommand format parsing Add GLib 2.0 adapter Refactor reading code into read.c Fix errno error buffers to not clobber errors Generate pkgconf during build Silence BSDSOURCE warnings Improve digit counting for multibulk creation Increase the maximum multi-bulk reply depth to 7. Increase the read buffer size from 2k to 16k. Use poll(2) instead of select(2) to support large fds (>= 1024). Makefile overhaul. Important to check out if you override one or more variables using environment variables or via arguments to the "make" tool. Issue #45: Fix potential memory leak for a multi bulk reply with 0 elements being created by the default reply object functions. Issue #43: Don't crash in an asynchronous context when Redis returns an error reply after the connection has been made (this happens when the maximum number of connections is reached). See commit log.