Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ PHP NEWS
- URI:
. Fixed bug GH-25019 (Uri\Rfc3986\Uri rejects a port with leading zeros as
out of range). (lazerg)
. Upgrade to uriparser 1.0.3. (CVE-2026-48841) (Sebastian Pipping, timwolla)

- Windows:
. Fixed bug GH-25009 (GetConsoleTitleW() buffer size passed in bytes).
Expand Down
294 changes: 130 additions & 164 deletions ext/uri/uriparser/include/uriparser/Uri.h

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions ext/uri/uriparser/include/uriparser/UriBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
/* Version */
# define URI_VER_MAJOR 1
# define URI_VER_MINOR 0
# define URI_VER_RELEASE 2
# define URI_VER_RELEASE 3
# define URI_VER_SUFFIX_ANSI ""
# define URI_VER_SUFFIX_UNICODE URI_ANSI_TO_UNICODE(URI_VER_SUFFIX_ANSI)

Expand All @@ -71,11 +71,11 @@

/* Full version strings */
# define URI_VER_ANSI \
URI_VER_ANSI_HELPER(URI_VER_MAJOR, URI_VER_MINOR, URI_VER_RELEASE, \
URI_VER_SUFFIX_ANSI)
URI_VER_ANSI_HELPER( \
URI_VER_MAJOR, URI_VER_MINOR, URI_VER_RELEASE, URI_VER_SUFFIX_ANSI)
# define URI_VER_UNICODE \
URI_VER_UNICODE_HELPER(URI_VER_MAJOR, URI_VER_MINOR, URI_VER_RELEASE, \
URI_VER_SUFFIX_UNICODE)
URI_VER_UNICODE_HELPER( \
URI_VER_MAJOR, URI_VER_MINOR, URI_VER_RELEASE, URI_VER_SUFFIX_UNICODE)

/* Unused parameter macro */
# ifdef __GNUC__
Expand Down Expand Up @@ -200,8 +200,8 @@ typedef void * (*UriFuncRealloc)(struct UriMemoryManagerStruct *, void *, size_t
*
* @since 0.9.0
*/
typedef void * (*UriFuncReallocarray)(struct UriMemoryManagerStruct *, void *, size_t,
size_t);
typedef void * (*UriFuncReallocarray)(
struct UriMemoryManagerStruct *, void *, size_t, size_t);

/**
* Function signature that custom free(3) functions must conform to
Expand All @@ -227,8 +227,8 @@ typedef struct UriMemoryManagerStruct {
UriFuncReallocarray reallocarray; /**< Pointer to custom reallocarray(3); to emulate
using realloc see uriEmulateReallocarray */
UriFuncFree free; /**< Pointer to custom free(3) */
void *
userData; /**< Pointer to data that the other function members need access to */
void * userData; /**< Pointer to data that the other function members need access to
*/
} UriMemoryManager; /**< @copydoc UriMemoryManagerStruct */

/**
Expand All @@ -240,7 +240,7 @@ typedef enum UriBreakConversionEnum {
URI_BR_TO_CR, /**< Convert to Macintosh line breaks ("\\x0d") */
URI_BR_TO_UNIX = URI_BR_TO_LF, /**< @copydoc UriBreakConversionEnum::URI_BR_TO_LF */
URI_BR_TO_WINDOWS =
URI_BR_TO_CRLF, /**< @copydoc UriBreakConversionEnum::URI_BR_TO_CRLF */
URI_BR_TO_CRLF, /**< @copydoc UriBreakConversionEnum::URI_BR_TO_CRLF */
URI_BR_TO_MAC = URI_BR_TO_CR, /**< @copydoc UriBreakConversionEnum::URI_BR_TO_CR */
URI_BR_DONT_TOUCH /**< Copy line breaks unmodified */
} UriBreakConversion; /**< @copydoc UriBreakConversionEnum */
Expand All @@ -251,15 +251,15 @@ typedef enum UriBreakConversionEnum {
typedef enum UriNormalizationMaskEnum {
URI_NORMALIZED = 0, /**< Do not normalize anything */
URI_NORMALIZE_SCHEME = 1 << 0, /**< Normalize scheme (fix uppercase letters) */
URI_NORMALIZE_USER_INFO =
1 << 1, /**< Normalize user info (fix uppercase percent-encodings) */
URI_NORMALIZE_USER_INFO = 1
<< 1, /**< Normalize user info (fix uppercase percent-encodings) */
URI_NORMALIZE_HOST = 1 << 2, /**< Normalize host (fix uppercase letters) */
URI_NORMALIZE_PATH = 1 << 3, /**< Normalize path (fix uppercase percent-encodings and
redundant dot segments) */
URI_NORMALIZE_QUERY =
1 << 4, /**< Normalize query (fix uppercase percent-encodings) */
URI_NORMALIZE_FRAGMENT =
1 << 5, /**< Normalize fragment (fix uppercase percent-encodings) */
URI_NORMALIZE_QUERY = 1
<< 4, /**< Normalize query (fix uppercase percent-encodings) */
URI_NORMALIZE_FRAGMENT = 1
<< 5, /**< Normalize fragment (fix uppercase percent-encodings) */
URI_NORMALIZE_PORT = 1 << 6 /**< Normalize port (drop leading zeros) @since 0.9.9 */
} UriNormalizationMask; /**< @copydoc UriNormalizationMaskEnum */

Expand All @@ -268,8 +268,8 @@ typedef enum UriNormalizationMaskEnum {
*/
typedef enum UriResolutionOptionsEnum {
URI_RESOLVE_STRICTLY = 0, /**< Full RFC conformance */
URI_RESOLVE_IDENTICAL_SCHEME_COMPAT =
1 << 0 /**< Treat %URI to resolve with identical scheme as having no scheme */
URI_RESOLVE_IDENTICAL_SCHEME_COMPAT = 1
<< 0 /**< Treat %URI to resolve with identical scheme as having no scheme */
} UriResolutionOptions; /**< @copydoc UriResolutionOptionsEnum */

/**
Expand Down Expand Up @@ -307,8 +307,8 @@ typedef enum UriResolutionOptionsEnum {
* @see UriMemoryManager
* @since 0.9.0
*/
URI_PUBLIC int uriCompleteMemoryManager(UriMemoryManager * memory,
UriMemoryManager * backend);
URI_PUBLIC int uriCompleteMemoryManager(
UriMemoryManager * memory, UriMemoryManager * backend);

/**
* Offers emulation of calloc(3) based on memory-&gt;malloc and memset.
Expand Down Expand Up @@ -341,8 +341,8 @@ URI_PUBLIC void * uriEmulateCalloc(UriMemoryManager * memory, size_t nmemb, size
* @see UriMemoryManager
* @since 0.9.0
*/
URI_PUBLIC void * uriEmulateReallocarray(UriMemoryManager * memory, void * ptr,
size_t nmemb, size_t size);
URI_PUBLIC void * uriEmulateReallocarray(
UriMemoryManager * memory, void * ptr, size_t nmemb, size_t size);

/**
* Run multiple tests against a given memory manager.
Expand Down Expand Up @@ -396,7 +396,7 @@ URI_PUBLIC int uriTestMemoryManager(UriMemoryManager * memory);
* @see uriTestMemoryManager
* @since 1.0.0
*/
URI_PUBLIC int uriTestMemoryManagerEx(UriMemoryManager * memory,
UriBool challengeAlignment);
URI_PUBLIC int uriTestMemoryManagerEx(
UriMemoryManager * memory, UriBool challengeAlignment);

#endif /* URI_BASE_H */
15 changes: 7 additions & 8 deletions ext/uri/uriparser/include/uriparser/UriIp4.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
*/

#if (defined(URI_PASS_ANSI) && !defined(URI_IP4_TWICE_H_ANSI)) \
|| (defined(URI_PASS_UNICODE) && !defined(URI_IP4_TWICE_H_UNICODE)) \
|| (!defined(URI_PASS_ANSI) && !defined(URI_PASS_UNICODE))
|| (defined(URI_PASS_UNICODE) && !defined(URI_IP4_TWICE_H_UNICODE)) \
|| (!defined(URI_PASS_ANSI) && !defined(URI_PASS_UNICODE))
/* What encodings are enabled? */
# include "UriDefsConfig.h"
# if (!defined(URI_PASS_ANSI) && !defined(URI_PASS_UNICODE))
Expand All @@ -62,9 +62,9 @@
# endif
/* Only one pass for each encoding */
# elif (defined(URI_PASS_ANSI) && !defined(URI_IP4_TWICE_H_ANSI) \
&& defined(URI_ENABLE_ANSI)) \
|| (defined(URI_PASS_UNICODE) && !defined(URI_IP4_TWICE_H_UNICODE) \
&& defined(URI_ENABLE_UNICODE))
&& defined(URI_ENABLE_ANSI)) \
|| (defined(URI_PASS_UNICODE) && !defined(URI_IP4_TWICE_H_UNICODE) \
&& defined(URI_ENABLE_UNICODE))
# ifdef URI_PASS_ANSI
# define URI_IP4_TWICE_H_ANSI 1
# include "UriDefsAnsi.h"
Expand Down Expand Up @@ -93,9 +93,8 @@ extern "C" {
* @see uriParseIpSixAddressA
* @see uriParseIpSixAddressMmA
*/
URI_PUBLIC int URI_FUNC(ParseIpFourAddress)(unsigned char * octetOutput,
const URI_CHAR * first,
const URI_CHAR * afterLast);
URI_PUBLIC int URI_FUNC(ParseIpFourAddress)(
unsigned char * octetOutput, const URI_CHAR * first, const URI_CHAR * afterLast);

# ifdef __cplusplus
}
Expand Down
Loading
Loading