Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
679a896
Backport #122718 to 26.8: Coalesce adjacent singleton row-mask update…
robot-clickhouse Oct 6, 2026
01b983a
Backport #120355 to 26.8: Reduce Lock Contention on Shared Context Mutex
robot-clickhouse Oct 14, 2026
bfccf1a
Backport #119510 to 26.8: Bump `mariadb-connector-c` to v3.4.10
robot-clickhouse Oct 14, 2026
c7d5dc2
Backport #124453 to 26.8: Add S3 bucket to `remote_url_allow_hosts`
robot-clickhouse Oct 14, 2026
54860c0
Backport #124255 to 26.8: Bump vendored `expat` from 2.8.2 to 2.9.0
robot-clickhouse Oct 14, 2026
980e94b
Backport #125463 to 26.8: Revert "Push filters below WindowStep on PA…
robot-clickhouse Oct 14, 2026
8e78019
Merge pull request #125772 from ClickHouse/backport/26.8/120355
clickhouse-gh[bot] Oct 14, 2026
c2483dc
Merge pull request #125780 from ClickHouse/backport/26.8/119510
clickhouse-gh[bot] Oct 14, 2026
01f7a16
Merge pull request #125789 from ClickHouse/backport/26.8/124453
alexbakharew Oct 14, 2026
6f08453
Backport #124930 to 26.8: Fix ATTACH for S3 disks created without 're…
robot-clickhouse Oct 14, 2026
b382ccf
Merge pull request #125799 from ClickHouse/backport/26.8/124255
clickhouse-gh[bot] Oct 14, 2026
2388715
Merge pull request #125806 from ClickHouse/backport/26.8/125463
clickhouse-gh[bot] Oct 14, 2026
49368dd
Backport #125487 to 26.8: Fix CapnProto schema depth check bypass thr…
robot-clickhouse Oct 14, 2026
b6b838b
Update autogenerated version to 26.8.27.9 and contributors
robot-clickhouse Oct 14, 2026
8c4276c
Merge pull request #125821 from ClickHouse/backport/26.8/124930
clickhouse-gh[bot] Oct 14, 2026
afc3fc4
Merge pull request #125834 from ClickHouse/backport/26.8/125487
clickhouse-gh[bot] Oct 14, 2026
4a1979a
Backport #125661 to 26.8: Validate `rabbitmq_routing_key_list` in the…
robot-clickhouse Oct 14, 2026
e0e7f87
Backport #125512 to 26.8: Never stop the server process from the line…
robot-clickhouse Oct 14, 2026
b9da51e
Backport #125575 to 26.8: Do not eliminate aggregators of `GROUPING S…
robot-clickhouse Oct 14, 2026
e5d73bb
Backport #125712 to 26.8: Stream-parse the `.backup` metadata file
robot-clickhouse Oct 14, 2026
9f0233b
Merge pull request #125864 from ClickHouse/backport/26.8/125661
clickhouse-gh[bot] Oct 14, 2026
032b2ad
Merge pull request #125869 from ClickHouse/backport/26.8/125512
clickhouse-gh[bot] Oct 14, 2026
f4df7e4
Merge pull request #125875 from ClickHouse/backport/26.8/125575
clickhouse-gh[bot] Oct 14, 2026
098343e
Backport #125774 to 26.8: Bump `vectorscan` from 5.4.11 to 5.4.13
robot-clickhouse Oct 14, 2026
6e1f65b
Merge pull request #125895 from ClickHouse/backport/26.8/125712
clickhouse-gh[bot] Oct 15, 2026
bbf8911
Merge pull request #125907 from ClickHouse/backport/26.8/125774
clickhouse-gh[bot] Oct 15, 2026
514af29
Backport #125505 to 26.8: Fix a possible segmentation fault in `AvroC…
robot-clickhouse Oct 15, 2026
3694fe0
Merge pull request #125934 from ClickHouse/backport/26.8/125505
clickhouse-gh[bot] Oct 15, 2026
64c27aa
Backport #123133 to 26.8: Require permission to override named collec…
robot-clickhouse Oct 15, 2026
b80bd77
Merge remote-tracking branch 'origin/26.8' into backport/26.8/123133
antonio2368 Oct 15, 2026
c6e751e
Backport #125760 to 26.8: Allow vertical merge into non-wide parts
robot-clickhouse Oct 15, 2026
4917aa8
Backport #122756 to 26.8: Fix `CANNOT_READ_ALL_DATA` in subcolumn siz…
robot-clickhouse Oct 15, 2026
4702bf0
Merge pull request #125982 from ClickHouse/backport/26.8/123133
antonio2368 Oct 15, 2026
2e40e98
Merge pull request #125998 from ClickHouse/backport/26.8/125760
clickhouse-gh[bot] Oct 15, 2026
4fd3b1c
Merge pull request #126000 from ClickHouse/backport/26.8/122756
clickhouse-gh[bot] Oct 15, 2026
5baea8e
Backport #120887 to 26.8: Reject deeply nested JSON documents instead…
robot-clickhouse Oct 15, 2026
1d41944
Update autogenerated version to 26.8.28.14 and contributors
robot-clickhouse Oct 15, 2026
0733fae
Backport #125900 to 26.8: Fix stack overflow in the CapnProto schema …
robot-clickhouse Oct 15, 2026
0cb10d7
Merge pull request #126051 from ClickHouse/backport/26.8/120887
clickhouse-gh[bot] Oct 15, 2026
1b51ba0
Backport #119368 to 26.8: Do not deserialize unexpected packets in TC…
robot-clickhouse Oct 15, 2026
99acab1
Backport #122128 to 26.8: materializeBlock: instantiate type-only hea…
robot-clickhouse Oct 15, 2026
bfc1d80
Merge pull request #126069 from ClickHouse/backport/26.8/125900
clickhouse-gh[bot] Oct 15, 2026
6693782
Backport #126032 to 26.8: Carry the configured name on a cluster buil…
robot-clickhouse Oct 15, 2026
3a1de64
Merge pull request #126089 from ClickHouse/backport/26.8/119368
clickhouse-gh[bot] Oct 15, 2026
5e401d0
Merge pull request #126093 from ClickHouse/backport/26.8/122128
clickhouse-gh[bot] Oct 15, 2026
4894962
Backport #125221 to 26.8: Fix `ORDER BY ... LIMIT` over an `Interval`…
robot-clickhouse Oct 16, 2026
471b230
Merge pull request #126114 from ClickHouse/backport/26.8/126032
devcrafter Oct 16, 2026
7b8b362
Merge pull request #126237 from ClickHouse/backport/26.8/125221
clickhouse-gh[bot] Oct 16, 2026
e24fd1d
Backport #121704 to 26.8: Stop the native SSH-key handshake from disc…
robot-clickhouse Oct 16, 2026
c979114
Merge pull request #126280 from ClickHouse/backport/26.8/121704
clickhouse-gh[bot] Oct 16, 2026
1230932
Backport #125785 to 26.8: Use constant-time comparison for TOTP codes…
robot-clickhouse Oct 16, 2026
5396bbd
Backport #116488 to 26.8: Fix reading dropped column with existing co…
robot-clickhouse Oct 16, 2026
4cba45f
Update autogenerated version to 26.8.29.10 and contributors
robot-clickhouse Oct 16, 2026
2064cc5
Merge pull request #126331 from ClickHouse/backport/26.8/116488
clickhouse-gh[bot] Oct 16, 2026
73910e2
Merge pull request #126323 from ClickHouse/backport/26.8/125785
clickhouse-gh[bot] Oct 16, 2026
89cdea1
Backport #125899 to 26.8: Apply `http_zlib_compression_level` only to…
robot-clickhouse Oct 16, 2026
2e86e18
Merge pull request #126350 from ClickHouse/backport/26.8/125899
clickhouse-gh[bot] Oct 16, 2026
32e4e7a
Backport #125717 to 26.8: Keep only sizes and checksums of the files …
robot-clickhouse Oct 16, 2026
9ed00b2
Fix native-client analyzer compatibility on 26.8
Kryst4lskyxx Oct 15, 2026
9593dcd
Keep analyzer regression FIFO separate from Bash tracing
Kryst4lskyxx Oct 17, 2026
c65c1e8
Merge pull request #126381 from ClickHouse/backport/26.8/125717
clickhouse-gh[bot] Oct 17, 2026
1ff9640
Merge pull request #125992 from Kryst4lskyxx/fix-26.8-native-client-a…
clickhouse-gh[bot] Oct 17, 2026
c7b3057
Backport #124905 to 26.8: Reject CR/LF in outgoing HTTP request lines…
robot-clickhouse Oct 17, 2026
da45179
Merge pull request #126400 from ClickHouse/backport/26.8/124905
clickhouse-gh[bot] Oct 17, 2026
f8238d1
Backport #118866 to 26.8: Require SELECT on the source when CREATE TA…
robot-clickhouse Oct 17, 2026
0732984
Update autogenerated version to 26.8.30.8 and contributors
robot-clickhouse Oct 17, 2026
9882c7f
Backport #125467 to 26.8: Estimate an equality with a `Bool` literal …
robot-clickhouse Oct 18, 2026
b2f3dde
Backport #126120 to 26.8: Fix out-of-bounds accesses in the replxx li…
robot-clickhouse Oct 18, 2026
bb45242
Merge pull request #126617 from ClickHouse/backport/26.8/126120
clickhouse-gh[bot] Oct 19, 2026
5cc9182
Backport #123195 to 26.8: Retry S3 backup and restore requests after …
robot-clickhouse Oct 19, 2026
301559f
Backport #113877 to 26.8: Fix out-of-bounds write on a long codec chain
robot-clickhouse Oct 19, 2026
227a902
Backport #124075 to 26.8: Leave only loadable objects behind in `0531…
robot-clickhouse Oct 19, 2026
67be05e
Merge pull request #126656 from ClickHouse/backport/26.8/123195
clickhouse-gh[bot] Oct 19, 2026
fdaf943
Backport #120407 to 26.8: [SECURITY] Mask credentials embedded in HTT…
robot-clickhouse Oct 19, 2026
20ceaf1
Merge pull request #126675 from ClickHouse/backport/26.8/113877
clickhouse-gh[bot] Oct 19, 2026
43b38c8
Fix the scope of the inherited definition check and drop the extra pr…
Oct 19, 2026
9599dff
Merge pull request #126691 from ClickHouse/backport/26.8/124075
clickhouse-gh[bot] Oct 19, 2026
2557c00
Backport #126046 to 26.8: Do not read part dictionaries when estimati…
robot-clickhouse Oct 19, 2026
99606b3
Backport #125893 to 26.8: Fix a crash and lost rows on INSERT when a …
robot-clickhouse Oct 19, 2026
d85111b
Update autogenerated version to 26.8.31.2 and contributors
robot-clickhouse Oct 19, 2026
4e73599
Merge pull request #126498 from ClickHouse/backport/26.8/118866
clickhouse-gh[bot] Oct 19, 2026
b2df76b
Backport #126388 to 26.8: Don't keep a copy of the disk's `DataSource…
robot-clickhouse Oct 19, 2026
5373322
Merge pull request #126714 from ClickHouse/backport/26.8/126046
clickhouse-gh[bot] Oct 19, 2026
713d1eb
Merge pull request #126731 from ClickHouse/backport/26.8/125893
clickhouse-gh[bot] Oct 19, 2026
701a243
Merge pull request #126764 from ClickHouse/backport/26.8/126388
clickhouse-gh[bot] Oct 19, 2026
bafd3dd
Backport #126550 to 26.8: Limit nesting depth of messages in Protobuf…
robot-clickhouse Oct 19, 2026
771b196
Backport #126547 to 26.8: Limit nesting depth of arrays in Redis replies
robot-clickhouse Oct 19, 2026
d46de11
Backport #126159 to 26.8: Fix segfault in `MySQLDump` format on `ENUM…
robot-clickhouse Oct 19, 2026
e37b5db
Backport #120776 to 26.8: Fix uninitialized offsets in Variant/Dynami…
robot-clickhouse Oct 19, 2026
592675c
Merge pull request #126796 from ClickHouse/backport/26.8/126550
clickhouse-gh[bot] Oct 19, 2026
08ba22c
Merge pull request #126804 from ClickHouse/backport/26.8/126547
clickhouse-gh[bot] Oct 20, 2026
e0d00d4
Merge pull request #126825 from ClickHouse/backport/26.8/120776
clickhouse-gh[bot] Oct 20, 2026
2c4c728
Backport #126126 to 26.8: Fix segfault in adaptive aggregation after …
robot-clickhouse Oct 20, 2026
d424b0f
Backport #126292 to 26.8: Fix heap-use-after-free in `TablesDependenc…
robot-clickhouse Oct 20, 2026
474f858
Backport #126204 to 26.8: Build the empty JOIN side of the constant-f…
robot-clickhouse Oct 20, 2026
4e95c64
Merge pull request #126809 from ClickHouse/backport/26.8/126159
PedroTadim Oct 20, 2026
3a9a506
Adapt the Bool-literal selectivity hunk to 26.8
PedroTadim Oct 20, 2026
36a25a2
Fix the 26.8 build of the row-mask coalescing backport
PedroTadim Oct 20, 2026
48f2364
Merge pull request #126900 from ClickHouse/backport/26.8/126126
clickhouse-gh[bot] Oct 20, 2026
dc83db6
Merge pull request #124274 from ClickHouse/backport/26.8/122718
clickhouse-gh[bot] Oct 20, 2026
b31954f
Remove the dictionary-definition checks from 05212 on 26.3
groeneai Oct 20, 2026
c1fe3d1
Merge remote-tracking branch 'origin/26.8' into HEAD
alexey-milovidov Oct 20, 2026
1661b2e
Merge pull request #126909 from ClickHouse/backport/26.8/126292
PedroTadim Oct 20, 2026
a2f2886
Merge pull request #126910 from ClickHouse/backport/26.8/126204
PedroTadim Oct 20, 2026
60bf0f3
Merge pull request #126710 from ClickHouse/backport/26.8/120407
clickhouse-gh[bot] Oct 20, 2026
11a26fa
Merge pull request #126579 from ClickHouse/backport/26.8/125467
clickhouse-gh[bot] Oct 20, 2026
cc51a7c
Update autogenerated version to 26.8.32.14 and contributors
robot-clickhouse Oct 20, 2026
86429ed
Backport #126553 to 26.8: Fix use-after-free and reading of long valu…
robot-clickhouse Oct 20, 2026
f0b6123
Merge pull request #127023 from ClickHouse/backport/26.8/126553
clickhouse-gh[bot] Oct 20, 2026
8c3861f
Backport #126548 to 26.8: Limit recursion depth when deserializing qu…
robot-clickhouse Oct 20, 2026
9f3e5ac
Backport #113599 to 26.8: Make the columns-description-cache eviction…
robot-clickhouse Oct 20, 2026
4c739d7
Backport #126942 to 26.8: Fix wrong `count()` for `Date32` equality t…
robot-clickhouse Oct 21, 2026
b16b5af
Merge pull request #127066 from ClickHouse/backport/26.8/113599
clickhouse-gh[bot] Oct 21, 2026
f1b5d16
Merge pull request #127075 from ClickHouse/backport/26.8/126942
clickhouse-gh[bot] Oct 21, 2026
bd9a52d
Backport #127015 to 26.8: Fix reading uninitialized memory in `polygo…
robot-clickhouse Oct 21, 2026
2188c17
Merge pull request #127103 from ClickHouse/backport/26.8/127015
clickhouse-gh[bot] Oct 21, 2026
8f61a7e
Backport #125701 to 26.8: Require READ and WRITE privileges for the F…
robot-clickhouse Oct 14, 2026
37abf45
Pass an absolute `FileLog` path in `05394_filelog_engine_file_source_…
oranjeai Oct 19, 2026
4ca4266
Merge pull request #125887 from ClickHouse/backport/26.8/125701
clickhouse-gh[bot] Oct 21, 2026
8a78545
Fix `05427_query_plan_deserialize_deep_recursion` for 26.8 plan seria…
alexey-milovidov Oct 21, 2026
b1beeb7
Backport #117407 to 26.8: Fix TOTP bypass in MySQL protocol authentic…
robot-clickhouse Oct 21, 2026
40a5174
Merge pull request #127048 from ClickHouse/backport/26.8/126548
clickhouse-gh[bot] Oct 21, 2026
c726fea
Backport #127139 to 26.8: Fix a crash with estimateCompressionRatio
robot-clickhouse Oct 21, 2026
912b9c3
Backport #127043 to 26.8: Improve glue catalog cache
robot-clickhouse Oct 21, 2026
d4b3a31
Backport #125823 to 26.8: Return `REQUIRED_SECOND_FACTOR` regardless …
robot-clickhouse Oct 21, 2026
f59569a
Merge pull request #127178 from ClickHouse/backport/26.8/127139
clickhouse-gh[bot] Oct 21, 2026
bc2b39c
Backport #126546 to 26.8: Validate malformed responses from HDFS Data…
robot-clickhouse Oct 21, 2026
5aea966
Update autogenerated version to 26.8.33.10 and contributors
robot-clickhouse Oct 21, 2026
3216b6e
Merge pull request #127202 from ClickHouse/backport/26.8/127043
clickhouse-gh[bot] Oct 21, 2026
8ebe732
Merge pull request #127218 from ClickHouse/backport/26.8/125823
clickhouse-gh[bot] Oct 21, 2026
6d28e5c
Merge pull request #127236 from ClickHouse/backport/26.8/126546
clickhouse-gh[bot] Oct 21, 2026
bcfcc88
Adapt test_mysql_protocol_fail_close_on_unverifiable_methods to 26.8
PedroTadim Oct 21, 2026
bab43bd
Backport #125558 to 26.8: Do not skip the client output teardown when…
robot-clickhouse Oct 21, 2026
77b769d
Merge pull request #127163 from ClickHouse/backport/26.8/117407
clickhouse-gh[bot] Oct 21, 2026
d7833b6
Merge pull request #127268 from ClickHouse/backport/26.8/125558
clickhouse-gh[bot] Oct 21, 2026
6e5e507
Backport #126937 to 26.8: Fix shitted string offsets of sparse `Nulla…
robot-clickhouse Oct 22, 2026
c5ee42d
Backport #125495 to 26.8: Fix row-policy bypass via client-supplied s…
robot-clickhouse Oct 22, 2026
e9a294d
Merge pull request #127305 from ClickHouse/backport/26.8/126937
clickhouse-gh[bot] Oct 22, 2026
32c0cbb
Merge pull request #127315 from ClickHouse/backport/26.8/125495
clickhouse-gh[bot] Oct 22, 2026
59b09df
Backport #122688 to 26.8: Substitute query parameters in row policy f…
robot-clickhouse Oct 22, 2026
73b22d4
Backport #123188 to 26.8: add a setting to allow disabling interserve…
robot-clickhouse Oct 22, 2026
6819341
Backport #126914 to 26.8: Do not pre-allocate memory for the declared…
robot-clickhouse Oct 22, 2026
5eb5429
Merge pull request #127340 from ClickHouse/backport/26.8/122688
clickhouse-gh[bot] Oct 22, 2026
4bd33c5
Merge pull request #127347 from ClickHouse/backport/26.8/123188
clickhouse-gh[bot] Oct 22, 2026
e0cfed8
Merge pull request #127357 from ClickHouse/backport/26.8/126914
clickhouse-gh[bot] Oct 22, 2026
9f7ad3b
Merge tag 'v26.8.34.13-lts' into bump/antalya-26.8/26.8.34
zvonand Oct 24, 2026
46b5e9a
Resolve conflicts in merge of v26.8.34.13-lts
zvonand Oct 24, 2026
787d0b3
Fix CI failures (Fast test)
zvonand Oct 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
url = https://github.com/ClickHouse/nats.c
[submodule "contrib/vectorscan"]
path = contrib/vectorscan
url = https://github.com/ClickHouse/vectorscan.git
url = https://github.com/ClickHouse/vectorscan
[submodule "contrib/llvm-project"]
path = contrib/llvm-project
url = https://github.com/ClickHouse/llvm-project
Expand Down
24 changes: 24 additions & 0 deletions base/poco/Net/src/HTTPRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "Poco/NumberFormatter.h"
#include "Poco/Ascii.h"
#include "Poco/String.h"
#include "Poco/Exception.h"


using Poco::NumberFormatter;
Expand Down Expand Up @@ -190,8 +191,31 @@ void HTTPRequest::setProxyCredentials(const std::string& scheme, const std::stri
}


namespace
{
bool hasLineBreak(const std::string& value)
{
return value.find_first_of("\r\n") != std::string::npos;
}

/// CR or LF in the request line or in a header would let the value inject headers or a whole second request.
void checkNoLineBreaks(const HTTPRequest& request)
{
if (hasLineBreak(request.getMethod()) || hasLineBreak(request.getURI()) || hasLineBreak(request.getVersion()))
throw InvalidArgumentException("HTTP request line contains CR or LF");
for (const auto& header : request)
{
if (hasLineBreak(header.first) || hasLineBreak(header.second))
throw InvalidArgumentException("HTTP request header contains CR or LF", header.first);
}
}
}


void HTTPRequest::write(std::ostream& ostr) const
{
checkNoLineBreaks(*this);

ostr << _method << " " << _uri << " " << getVersion() << "\r\n";
HTTPMessage::write(ostr);
ostr << "\r\n";
Expand Down
24 changes: 24 additions & 0 deletions base/poco/Redis/include/Poco/Redis/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,34 @@ namespace Redis
return result.str();
}

/// The maximum allowed nesting depth of arrays in a reply.
/// Replies of real Redis servers are nested only a few levels deep,
/// while unbounded nesting would lead to stack overflow in the recursive parser.
static constexpr int MAX_NESTING_DEPTH = 128;

static void read(RedisInputStream & input, Array & value)
{
value.clear();

struct DepthGuard
{
explicit DepthGuard(int & depth_) : depth(depth_)
{
++depth;
}

~DepthGuard()
{
--depth;
}

int & depth;
};

DepthGuard depth_guard(input.arrayNestingDepth());
if (depth_guard.depth > MAX_NESTING_DEPTH)
throw RedisException("Too deep nesting of arrays in the answer received from Redis server");

Int64 length = NumberParser::parse64(input.getline());

if (length != -1)
Expand Down
13 changes: 13 additions & 0 deletions base/poco/Redis/include/Poco/Redis/RedisStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,22 @@ namespace Redis
std::string getline();
/// Redis uses \r\n as delimiter. This getline version removes
/// the \r from the result.

int & arrayNestingDepth();
/// Returns the current nesting depth of arrays being read from the stream.
/// Used to limit the recursion depth while parsing nested arrays.

private:
int _arrayNestingDepth = 0;
};


inline int & RedisInputStream::arrayNestingDepth()
{
return _arrayNestingDepth;
}


}
} // namespace Poco::Redis

Expand Down
15 changes: 14 additions & 1 deletion base/poco/Redis/src/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,23 @@ RedisType::Ptr Client::readReply()
RedisType::Ptr result = RedisType::createRedisType(c);
if (result.isNull())
{
/// The stream is not at a reply boundary anymore, so the connection cannot be reused.
disconnect();
throw RedisException("Invalid Redis type returned");
}

result->read(*_input);
try
{
result->read(*_input);
}
catch (...)
{
/// A partially read reply leaves unread data in the stream.
/// If the connection were reused (e.g. returned to a pool), the next request
/// would read the remainder of this reply instead of its own one.
disconnect();
throw;
}

return result;
}
Expand Down
2 changes: 2 additions & 0 deletions base/poco/XML/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ add_library (Poco::XML::Expat ALIAS _poco_xml_expat)
target_compile_options (_poco_xml_expat
PRIVATE
-Wno-cast-qual
-Wno-disabled-macro-expansion
-Wno-empty-translation-unit
-Wno-extra-semi-stmt
-Wno-implicit-fallthrough
Expand Down Expand Up @@ -49,6 +50,7 @@ target_compile_options (_poco_xml
-Wno-unreachable-code
-Wno-unreachable-code-break
-Wno-unreachable-code-fallthrough
-Wno-unreachable-code-return
-Wno-unused-macros
-Wno-unused-parameter
-Wno-zero-as-null-pointer-constant
Expand Down
105 changes: 79 additions & 26 deletions base/poco/XML/include/Poco/XML/expat.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Copyright (c) 2023 Sony Corporation / Snild Dolkow <[email protected]>
Copyright (c) 2024 Taichi Haradaguchi <[email protected]>
Copyright (c) 2025 Matthew Fernandez <[email protected]>
Copyright (c) 2026 Braian Plaku <[email protected]>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
Expand All @@ -40,12 +41,14 @@
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
SPDX-License-Identifier: MIT
*/

#ifndef Expat_INCLUDED
# define Expat_INCLUDED 1

# include <stdint.h> // for uint8_t
# include <stdint.h> // for int64_t, uint8_t, uint64_t
# include <stdlib.h>
# include "expat_external.h"

Expand Down Expand Up @@ -137,6 +140,26 @@ enum XML_Error {
XML_ERROR_NOT_STARTED,
};

/* Added in 2.9.0. */
enum XML_Prop_Error {
XML_PROP_ERROR_NONE = 0, // i.e. success

XML_PROP_ERROR_INVALID_KEY = 1, // i.e. the property is not known at all
XML_PROP_ERROR_INVALID_TYPE = 2, // i.e. the property is known but expects a
// different type (so a different
// getter/setter would need to be called)
XML_PROP_ERROR_INVALID_VALUE = 3, // i.e. the value is invalid (with a setter
// function) or a NULL-pointer (with a
// getter function)

XML_PROP_ERROR_PARSER_NULL = 4, // i.e. the parser argument is NULL
XML_PROP_ERROR_PARSER_NOT_ROOT = 5, // i.e. the parser is not a root parser
// but a subparser (and a root parser is
// needed)

/* potentially more error codes upcoming here */
};

enum XML_Content_Type {
XML_CTYPE_EMPTY = 1,
XML_CTYPE_ANY,
Expand Down Expand Up @@ -764,29 +787,6 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser);
XMLPARSEAPI(int)
XML_GetIdAttributeIndex(XML_Parser parser);

# ifdef XML_ATTR_INFO
/* Source file byte offsets for the start and end of attribute names and values.
The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
file an attribute value of "blah" will yield:
info->valueEnd - info->valueStart = 4 bytes.
*/
typedef struct {
XML_Index nameStart; /* Offset to beginning of the attribute name. */
XML_Index nameEnd; /* Offset after the attribute name's last byte. */
XML_Index valueStart; /* Offset to beginning of the attribute value. */
XML_Index valueEnd; /* Offset after the attribute value's last byte. */
} XML_AttrInfo;

/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
passed in last call to the XML_StartElementHandler that were specified
in the start-tag rather than defaulted. Each attribute/value pair counts
as 1; thus the number of entries in the array is
XML_GetSpecifiedAttributeCount(parser) / 2.
*/
XMLPARSEAPI(const XML_AttrInfo *)
XML_GetAttributeInfo(XML_Parser parser);
# endif

/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
detected. The last call to XML_Parse must have isFinal true; len
may be zero for this call (or any other).
Expand Down Expand Up @@ -929,7 +929,9 @@ XML_SetParamEntityParsing(XML_Parser parser,
Returns 1 if successful, 0 when called after parsing has started.
Note: If parser == NULL, the function will do nothing and return 0.
DEPRECATED since Expat 2.8.0.
Please use XML_SetHashSalt16Bytes instead.
*/
XML_ATTR_DEPRECATED("please use XML_SetHashSalt16Bytes instead")
XMLPARSEAPI(int)
XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt);

Expand Down Expand Up @@ -969,15 +971,24 @@ XML_GetErrorCode(XML_Parser parser);
return 0 to indicate an error.
Note: XML_GetCurrentByteIndex returns -1 to indicate an error.
*/
XML_ATTR_DEPRECATED("please use XML_GetCurrentLineNumber64 instead")
XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser);
XMLPARSEAPI(uint64_t) XML_GetCurrentLineNumber64(XML_Parser parser);
XML_ATTR_DEPRECATED("please use XML_GetCurrentColumnNumber64 instead")
XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser);
XMLPARSEAPI(uint64_t) XML_GetCurrentColumnNumber64(XML_Parser parser);
XML_ATTR_DEPRECATED("please use XML_GetCurrentByteIndex64 instead")
XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser);
XMLPARSEAPI(int64_t) XML_GetCurrentByteIndex64(XML_Parser parser);

/* Return the number of bytes in the current event.
Returns 0 if the event is in an internal entity.
*/
XML_ATTR_DEPRECATED("please use XML_GetCurrentByteCount64 instead")
XMLPARSEAPI(int)
XML_GetCurrentByteCount(XML_Parser parser);
XMLPARSEAPI(uint64_t)
XML_GetCurrentByteCount64(XML_Parser parser);

/* If XML_CONTEXT_BYTES is >=1, returns the input buffer, sets
the integer pointed to by offset to the offset within this buffer
Expand All @@ -989,8 +1000,11 @@ XML_GetCurrentByteCount(XML_Parser parser);
NOTE: The character pointer returned should not be used outside
the handler that makes the call.
*/
XML_ATTR_DEPRECATED("please use XML_GetInputContext64 instead")
XMLPARSEAPI(const char *)
XML_GetInputContext(XML_Parser parser, int *offset, int *size);
XMLPARSEAPI(const char *)
XML_GetInputContext64(XML_Parser parser, int64_t *offset, uint64_t *size);

/* For backwards compatibility with previous versions. */
# define XML_GetErrorLineNumber XML_GetCurrentLineNumber
Expand Down Expand Up @@ -1045,11 +1059,15 @@ enum XML_FeatureEnum {
XML_FEATURE_UNICODE_WCHAR_T,
XML_FEATURE_DTD,
XML_FEATURE_CONTEXT_BYTES,
/* Added in Expat 1.95.5, removed in Expat 2.9.0. */
XML_FEATURE_MIN_SIZE,
XML_FEATURE_SIZEOF_XML_CHAR,
XML_FEATURE_SIZEOF_XML_LCHAR,
/* Added in Expat 2.0.0. */
XML_FEATURE_NS,
/* Added in Expat 2.0.1. */
XML_FEATURE_LARGE_SIZE,
/* Added in Expat 2.1.0, removed in Expat 2.9.0. */
XML_FEATURE_ATTR_INFO,
/* Added in Expat 2.4.0. */
XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT,
Expand All @@ -1071,6 +1089,41 @@ typedef struct {
XMLPARSEAPI(const XML_Feature *)
XML_GetFeatureList(void);

/* Added in Expat 2.9.0. */
enum XML_Parser_Property {
# if defined(XML_TESTING)
XML_PROP_INVALID = 0,
# endif
# if XML_GE == 1
XML_PROP_ALLOC_TRACKER_ACTIVATION_THRESHOLD = 1, // of type `uint64_t`
XML_PROP_ALLOC_TRACKER_MAXIMUM_AMPLIFICATION = 2, // of type `double`
XML_PROP_BILLION_LAUGHS_ACTIVATION_THRESHOLD = 3, // of type `uint64_t`
XML_PROP_BILLION_LAUGHS_MAXIMUM_AMPLIFICATION = 4, // of type `double`
# endif
XML_PROP_REPARSE_DEFERRAL_ENABLED = 5, // of type `XML_Bool`
/* more properties upcoming here */
};

/* Added in Expat 2.9.0. */
XMLPARSEAPI(enum XML_Prop_Error)
XML_GetPropertyBool(XML_Parser parser, enum XML_Parser_Property property,
XML_Bool *value);
XMLPARSEAPI(enum XML_Prop_Error)
XML_GetPropertyDouble(XML_Parser parser, enum XML_Parser_Property property,
double *value);
XMLPARSEAPI(enum XML_Prop_Error)
XML_GetPropertyUInt64(XML_Parser parser, enum XML_Parser_Property property,
uint64_t *value);
XMLPARSEAPI(enum XML_Prop_Error)
XML_SetPropertyBool(XML_Parser parser, enum XML_Parser_Property property,
XML_Bool value);
XMLPARSEAPI(enum XML_Prop_Error)
XML_SetPropertyDouble(XML_Parser parser, enum XML_Parser_Property property,
double value);
XMLPARSEAPI(enum XML_Prop_Error)
XML_SetPropertyUInt64(XML_Parser parser, enum XML_Parser_Property property,
uint64_t value);

# if defined(XML_DTD) || (defined(XML_GE) && XML_GE == 1)
/* Added in Expat 2.4.0 for XML_DTD defined and
* added in Expat 2.6.0 for XML_GE == 1. */
Expand Down Expand Up @@ -1103,8 +1156,8 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
See https://semver.org
*/
# define XML_MAJOR_VERSION 2
# define XML_MINOR_VERSION 8
# define XML_MICRO_VERSION 2
# define XML_MINOR_VERSION 9
# define XML_MICRO_VERSION 0

# ifdef __cplusplus
}
Expand Down
17 changes: 17 additions & 0 deletions base/poco/XML/include/Poco/XML/expat_external.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Copyright (c) 2017 Rhodri James <[email protected]>
Copyright (c) 2018 Yury Gribov <[email protected]>
Copyright (c) 2026 Matthew Fernandez <[email protected]>
Copyright (c) 2026 Braian Plaku <[email protected]>
Licensed under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining
Expand All @@ -36,6 +37,8 @@
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
SPDX-License-Identifier: MIT
*/

#ifndef Expat_External_INCLUDED
Expand Down Expand Up @@ -123,6 +126,17 @@
# define XML_ATTR_ALLOC_SIZE(x)
# endif

/* Marks a function that Expat still provides but that callers should move off
of. */
# if defined(__clang__) || defined(__GNUC__)
# define XML_ATTR_DEPRECATED(message) \
__attribute__((__deprecated__(message)))
# elif defined(_MSC_VER)
# define XML_ATTR_DEPRECATED(message) __declspec(deprecated(message))
# else
# define XML_ATTR_DEPRECATED(message) // empty i.e. no deprecation
# endif

# define XMLPARSEAPI(type) XMLIMPORT type XMLCALL

# ifdef __cplusplus
Expand Down Expand Up @@ -152,6 +166,9 @@ typedef char XML_LChar;
# endif /* XML_UNICODE */

# ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
# if defined(__clang__) || defined(__GNUC__)
# warning Macro XML_LARGE_SIZE is deprecated, please use the 64bit location API functions instead.
# endif
typedef long long XML_Index;
typedef unsigned long long XML_Size;
# else
Expand Down
2 changes: 2 additions & 0 deletions base/poco/XML/src/ascii.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
SPDX-License-Identifier: MIT
*/

#define ASCII_A 0x41
Expand Down
Loading
Loading