Skip to content

Releases: pubnub/c-core

v7.1.3

16 Apr 09:52
305e795

Choose a tag to compare

April 16 2026

Modified

  • Add Windows async DNS resolution via DnsQueryEx and improve IPv6 fallback.

v7.1.2

18 Mar 11:23
a301dad

Choose a tag to compare

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 in pubnub_version.h. Update pubnub_uname() format to match Windows and POSIX implementations and add PUBNUB_SDK_VERSION_SUFFIX support.

v7.1.1

12 Mar 15:10
95781db

Choose a tag to compare

March 12 2026

Fixed

  • Move offset_buf declaration outside the if block so it remains in scope when ENCODE_URL_PARAMETERS reads the stored pointer.
  • Initialize part_sign to NULL instead of (char*)"" to avoid undefined behavior when free() is called in non-crypto builds.
  • Each DNS query now gets a random 16-bit transaction ID via rand(), seeded once with time(NULL). IDs are stored in dns_queries_tracking and 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 >= 224 in is_valid_ipv4. Multicast, reserved/Class E, and broadcast ranges are not valid DNS server addresses.
  • Release ee->mutw before calling PubNub APIs or pbcc_ee_handle_event to 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_lock acquisition after pbcc_deinit()/pbpal_free() because they don't need the global allocator lock and pbcc_subscribe_ee_free re-locks the non-recursive m_lock via pubnub_register_callbackpb_valid_ctx_ptr, causing self-deadlock on the same thread.
  • Entity can outlive its parent pubnub_t context, so logging through _entity->pb is a use-after-free.
  • Replace header-only probe (QDCOUNT=0) with a proper A-query for example.com and validate response transaction ID, fixing false negatives on resolvers that silently drop malformed packets.

Modified

  • Move pubnub_internal.h include above windows.h in pbcc_logger_manager.c so winsock2.h is included first, preventing redefinition errors in builds without _WINSOCKAPI_ defined.
  • Use %u instead of %d for unsigned int count in snprintf to 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

03 Mar 23:04
cf5eaee

Choose a tag to compare

March 03 2026

Added

  • Add new logger API methods to C++ pubnub::context, Qt pubnub_qt, and Qt pubnub::context classes, guarded by PUBNUB_USE_LOGGER.

Modified

  • Change PUBNUB_LOG_MAP_SET_BOOL to PUBNUB_LOG_MAP_SET_NUMBER for opt.limit and opt.offset (both unsigned) in pubnub_here_now_ex and pubnub_global_here_now_ex so the actual numeric values are logged instead of being truncated to true/false.
  • Use pbms_start/pbms_elapsed and pb_sleep_ms in pubnub_free_with_timeout to avoid a CPU-spinning loop and to fix portability issues with clock() on some platforms.
  • Add PUBNUB_LOG_DEBUG messages 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 from TRACE to DEBUG.
  • Adjust log levels for missing DNS record messages to better match the severity of each event.

v7.0.2

27 Feb 13:49
3893b72

Choose a tag to compare

February 27 2026

Modified

  • Relocate debug log from pubnub_enforce_api setter to pubnub_init config output under runtime selection guards.

v7.0.1

26 Feb 15:09
5b24f68

Choose a tag to compare

February 26 2026

Fixed

  • Add pubnub_internal.h and pubnub_logger_internal.h includes to pbcc_subscribe_event_engine_events.c and pbcc_crypto.c for logger macro availability.
  • Move set->ee assignment before pubnub_subscription_set_add calls to prevent crash on uninitialized set->ee->pb dereference.

v7.0.0

26 Feb 10:15
b8c3a6a

Choose a tag to compare

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 sync await interface.
  • Added way to set pn_sdk in runtime.

Fixed

  • Fix issue because of which pubnub_unsubscribe_with_subscription and pubnub_unsubscribe_with_subscription_set nullified 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 freed ee as user_data.
  • pbarray_remove() uses pointer equality; match by (callback, user_data) and remove by index with pbarray_remove_element_at() so the intended listener is actually removed.
  • Move NULL check for cryptor_header before the first dereference in pbcc_cryptor_header_v1_to_alloc_block and remove the redundant check.
  • Guard subs dereference in pubnub_subscription_set_union and pubnub_subscription_set_subtract with a NULL check before the loop.
  • Fix adding long message actions by disabling Gzip compression.
  • Access .ipv4 member when assigning parsed address to dns_bytes.
  • Use getsockname() to verify a Global Unicast source (2000::/3) instead of trusting connect().

Modified

  • Fixed issues because of which TLS read returned right away to the state machine without even waiting for select.

v6.2.0

10 Dec 10:02
ac388a3

Choose a tag to compare

December 10 2025

Added

  • Add working IPv6 route detection to decide the preferable connection interface.
  • When built with PUBNUB_DNS_SERVERS_VALIDATION_TIMEOUT set 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_await wasn't waiting after pubnub_cancel has been called.
  • Fix WinHttpGetProxyForUrl usage with URL with schema instead of domain only.
  • Fix issue with /etc/resolv.conf parsing where untrimmed string produced wrong address.
  • Some Windows-related interfaces, because of different pubnub_ struct layouts caused by different pubnub_config.h type aliases and pre-processing macros, accessed and modified wrong fields.
  • Fix set_from_url4proxy for proper lpszProxy parsing.

Modified

  • Add defaults for PUBNUB_ADVANCED_KEEP_ALIVE in all related pubnub_config.h files.
  • 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

17 Nov 12:43
cb433cd

Choose a tag to compare

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

07 Nov 19:23
0f070e1

Choose a tag to compare

November 07 2025

Added

  • BREAKING CHANGES: Add limit and offset parameters to pubnub_here_now_options used in pubnub_here_now_ex. Set limit to be set to default (1000) for pubnub_here_now (not ex) function.

Modified

  • Try receiving DNS servers with DnsQueryConfig and fallback to the adapters with GetAdaptersAddresses.