Releases: pubnub/c-core
Releases · pubnub/c-core
v7.1.3
v7.1.2
March 18 2026
Fixed
- Fix ABI mismatch where posix/windows sources picked the local
pubnub_internal.h(wrong struct pubnub_pal size) on OpenSSL builds, so timeout fields were read as 0 and triggered an assertion. Use #include <pubnub_internal.h> so the include path selects the correct header per build. - Add missing
pubnub_uagent()function implementation for OpenSSL platform as declared inpubnub_version.h. Updatepubnub_uname()format to match Windows and POSIX implementations and addPUBNUB_SDK_VERSION_SUFFIXsupport.
v7.1.1
March 12 2026
Fixed
- Move
offset_bufdeclaration outside theifblock so it remains in scope whenENCODE_URL_PARAMETERSreads the stored pointer. - Initialize
part_signtoNULLinstead of(char*)""to avoid undefined behavior whenfree()is called in non-crypto builds. - Each DNS query now gets a random 16-bit transaction ID via
rand(), seeded once withtime(NULL). IDs are stored indns_queries_trackingand validated on response to ensure concurrent A and AAAA queries have distinct IDs per RFC 5452. Fixed the following issues reported by @katzoded: #243. - Filter DNS server addresses with first
octet >= 224inis_valid_ipv4. Multicast, reserved/Class E, and broadcast ranges are not valid DNS server addresses. - Release
ee->mutwbefore calling PubNub APIs orpbcc_ee_handle_eventto prevent lock-order inversion with the IO callback thread in both subscribe and unsubscribe paths. Add deadlock regression test covering all unsubscribe paths. - Move
m_lockacquisition afterpbcc_deinit()/pbpal_free()because they don't need the global allocator lock andpbcc_subscribe_ee_freere-locks the non-recursivem_lockviapubnub_register_callback→pb_valid_ctx_ptr, causing self-deadlock on the same thread. - Entity can outlive its parent
pubnub_tcontext, so logging through_entity->pbis a use-after-free. - Replace header-only probe (
QDCOUNT=0) with a proper A-query forexample.comand validate response transaction ID, fixing false negatives on resolvers that silently drop malformed packets.
Modified
- Move
pubnub_internal.hinclude abovewindows.hinpbcc_logger_manager.csowinsock2.his included first, preventing redefinition errors in builds without_WINSOCKAPI_defined. - Use
%uinstead of%dforunsigned intcountinsnprintfto match the actual type. - Add buffer edge cases, result stability, broadcast/multicast filtering, no-DNS adapter handling, adapter flapping stress test, and multiple DNS per adapter phases. Extend baseline with multicast check and IPv6 with duplicate detection.
v7.1.0
March 03 2026
Added
- Add new logger API methods to C++
pubnub::context, Qtpubnub_qt, and Qtpubnub::contextclasses, guarded byPUBNUB_USE_LOGGER.
Modified
- Change
PUBNUB_LOG_MAP_SET_BOOLtoPUBNUB_LOG_MAP_SET_NUMBERforopt.limitandopt.offset(bothunsigned) inpubnub_here_now_exandpubnub_global_here_now_exso the actual numeric values are logged instead of being truncated totrue/false. - Use
pbms_start/pbms_elapsedandpb_sleep_msinpubnub_free_with_timeoutto avoid a CPU-spinning loop and to fix portability issues withclock()on some platforms. - Add
PUBNUB_LOG_DEBUGmessages for hostname resolution, selected DNS server, resolved addresses, and address family across POSIX/Windows sockets, FreeRTOS, and Microchip Harmony platforms, and promote existing connect-address logs fromTRACEtoDEBUG. - Adjust log levels for missing DNS record messages to better match the severity of each event.
v7.0.2
February 27 2026
Modified
- Relocate debug log from
pubnub_enforce_apisetter topubnub_initconfig output under runtime selection guards.
v7.0.1
February 26 2026
Fixed
- Add
pubnub_internal.handpubnub_logger_internal.hincludes topbcc_subscribe_event_engine_events.candpbcc_crypto.cfor logger macro availability. - Move
set->eeassignment beforepubnub_subscription_set_addcalls to prevent crash on uninitializedset->ee->pbdereference.
v7.0.0
February 26 2026
Added
- BREAKING CHANGES: Added support for extendable logging, which can log structured data and allow to register customer loggers.
- Added default logger for POSIX/Windows (
stdio), and separate for FreeRTOS and Harmony. - Now request / response is logged as single log entries.
- Added mechanism to drastically reduce the amount of logs generated with
syncawait interface. - Added way to set pn_sdk in runtime.
Fixed
- Fix issue because of which
pubnub_unsubscribe_with_subscriptionandpubnub_unsubscribe_with_subscription_setnullified passed pointer even if "user" code still owns it. - Save mutex to local variable before freeing subscription and subscription_set to avoid dereferencing freed memory on unlock/destroy.
- Unregister PubNub callback in
pbcc_subscribe_ee_free()so late async completions do not invoke it with freedeeas user_data. pbarray_remove()uses pointer equality; match by (callback, user_data) and remove by index withpbarray_remove_element_at()so the intended listener is actually removed.- Move NULL check for
cryptor_headerbefore the first dereference inpbcc_cryptor_header_v1_to_alloc_blockand remove the redundant check. - Guard
subsdereference inpubnub_subscription_set_unionandpubnub_subscription_set_subtractwith a NULL check before the loop. - Fix adding long message actions by disabling Gzip compression.
- Access
.ipv4member when assigning parsed address todns_bytes. - Use
getsockname()to verify a Global Unicast source (2000::/3) instead of trustingconnect().
Modified
- Fixed issues because of which TLS read returned right away to the state machine without even waiting for
select.
v6.2.0
December 10 2025
Added
- Add working IPv6 route detection to decide the preferable connection interface.
- When built with
PUBNUB_DNS_SERVERS_VALIDATION_TIMEOUTset to delay in milliseconds, system DNS servers' discovery will make an actual DNS query, and the value will be used as a request timeout. - Add handling of the IPv6 proxy address provided by automated (or PAC) proxy discovery API.
Fixed
- Fix issue because of which
pubnub_awaitwasn't waiting afterpubnub_cancelhas been called. - Fix
WinHttpGetProxyForUrlusage with URL with schema instead of domain only. - Fix issue with
/etc/resolv.confparsing where untrimmed string produced wrong address. - Some Windows-related interfaces, because of different
pubnub_struct layouts caused by differentpubnub_config.htype aliases and pre-processing macros, accessed and modified wrong fields. - Fix
set_from_url4proxyfor properlpszProxyparsing.
Modified
- Add defaults for
PUBNUB_ADVANCED_KEEP_ALIVEin all relatedpubnub_config.hfiles. - When built with IPv6 support, first try to use any of the user-provided IPv6 DNS servers before falling back to the user-provided IPv4 before falling back to the address provided by a well-known DNS provider.
- When built with IPv6 support, SDK will send two queries to receive both records and decide which will be most suitable for currently available routing.
v6.1.0
November 17 2025
Added
- Added SNI (Server Name Indication) support for TLS connections.
- Added hostname verification for SSL/TLS certificates to prevent MITM attacks.
Modified
- Update bundled certificates (added Amazon Root CA 1) which is used for secured connection and peers verification.
- Filter out DNS servers received from disconnected adapters, loopback, and APIPA addresses.
- Added tests to test DNS server discovery in a controlled Windows environment (manual).
v6.0.0
November 07 2025
Added
- BREAKING CHANGES: Add
limitandoffsetparameters topubnub_here_now_optionsused inpubnub_here_now_ex. Setlimitto be set to default (1000) forpubnub_here_now(not ex) function.
Modified
- Try receiving DNS servers with
DnsQueryConfigand fallback to the adapters withGetAdaptersAddresses.