Commit Graph

5943 Commits

Author SHA1 Message Date
Matej Kenda
38b2f2f1a3 enh(ci): Add macos sanitizers job (#4313) 2024-01-05 22:57:53 +01:00
Matej Kenda
7c8d5e2881 fix(Crypto): EVP_CIPHER_CTX_init is incorrectly defined in Envelope.cpp if it is not defined already by OpenSSL. Fixed to properly use EVP_CIPHER_CTX_reset. 2024-01-05 16:22:28 +01:00
Aleksandar Fabijanic
071de054c1
fix(UUID): UUID parser silently ignores too long strings #4375 (#4384) 2024-01-05 12:59:01 +01:00
Matej Kenda
02683ea7f1 Incorporated Debian patches (#4380)
* Debian: Use null as device file as console might not be there

* Debian: Add GNU Hurd support

* Debian: Includes not available on Hurd

* Debian: Disable SHA2 test on platforms where it's broken

* Debian: Set POCO_NO_FPENVIRONMENT for armel

---------

Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
2024-01-04 20:35:00 +01:00
Günter Obiltschnig
48d7a3ede1 doc(ReleaseNotes): fix formatting, add PR links 2023-12-23 09:11:37 +01:00
Alex Fabijanic
9c7cba6d6c backport leftover 1.12 changes 2023-12-22 20:22:33 +01:00
Aleksandar Fabijanic
bdf38b5bac
Release 1.13 misc (#4371)
* Add changes from 1.11.x and 1.12.x

* Updated changelogs and contributors.

* Update CONTRIBUTORS

* Update CHANGELOG

add SQLParser note

* Update 99100-ReleaseNotes.page

SQLParser note

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2023-12-22 16:55:29 +01:00
Aleksandar Fabijanic
86084cb7b2
feat(Data::AbstractSessionImpl): add autoCommit property and tests #4261 (#4262)
* fix(Data::AbstracSessionImpl): protect autocommit feature handlers #4261

* chore(CI): re-enable mysql

* MySQL SessionImpl: make sure autocommit mode is on when session is openend or reset.

* PostgreSQL SessionImpl: reuse autocommit flag of AbstractSessionImpl.

* Github workflow: re-activated linux-gcc-make-postgres

* Fixed indentation in ci.yml

* Fix for DataTest SQLExecutor: use connector

* Data::Session: when parser is not used and autocommit mode is off, assume any SQL statement begins a transaction.

* PostgreSQL: don't use SQL parser (it currently cannot handle placeholders).

* PostgreSQL: added test sessionTransactionNoAutoCommit

* PostgreSQL test suite: removed reference to generic SQLExecutor

* PostgreSQL: fixes for sessionTransactionNoAutoCommit.

* MySQL: added test sessionPoolAndUnicode (from #2801)

* Fixed #define in sql-parser

* Data generic testsuite: support numbered placeholders

* PostgreSQL test suite: added missing include directory to Makefile.

* Attempt to fix PostgreSQL Makefiles

* PostgreSQL testsuite: added include path to Makefile

* PostgreSQL testsuite: added PocoDataTest library to Makefile

* DataTest SQLExecutor::formatSQL: don't use string_view

* PostgreSQL test suite: delegated most tests to Poco::Data::Test

* Makefile: added dependencies on Data-Tests

* Weaken assumptions about async in generic transaction tests

* Makefile: added dependency for Prometheus samples

* Fix deadlock in DataTest SQLExecutor

* PostgreSQL tests SQLExecutor: cleanup

* feat(Data::AbstractSessionImpl): add autoCommit property and tests #4261

* Brought MySQL backend in line with _autoCommit flag of AbstractSessionImpl.

---------

Co-authored-by: Friedrich Wilckens <frwilckens@gmail.com>
Co-authored-by: Friedrich Wilckens <friedrich.wilckens@ingramcontent.com>
2023-12-22 09:27:34 +01:00
Kari Argillander
80cde9e3e6 Use vs160 & vs170 in rebuild all scripts
I'm not actually sure how much these scripts are even used but let's
just update these as well to support 160 and 170.
2023-12-18 17:26:13 +01:00
Kari Argillander
4e352c8dbd Add old Visual Studio files to gitignore
As it is plan to continue support generating old Visual Studio files a
little wile it makes sense to ignore these files so they are not anymore
popping peoples eyes if they use those.
2023-12-18 17:26:13 +01:00
Kari Argillander
d1d557a4f7 Remove vs140 and vs150 project files
As we now only support C++17 these does not make much sense to keep.
2023-12-18 17:26:13 +01:00
Kari Argillander
bf3c519183
Fix some issues found with clang-tidy (#4353)
* directoryiterator: Fix missing inline

Add missing inline to inline function.

This was found with clang-tidy check:  misc-definitions-in-headers

* Convert deprecated throw() to noexcept

throw() has been deprecated in standar in C++17. It has been removed in
C++20. Code still compiles but let's just define these at those should
be.

These where found with clang-tidy check: modernize-use-noexcept

* Fix unnecessary copy initializations

Clang-tidy did find these with check:

  performance-unnecessary-copy-initialization

* Fix some strings not references

Looks like these are just missing reference marks.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-17 16:55:30 +01:00
Matej Kenda
111fe90dd9
enh(NumberFormatter): Introduce backward compatible options for formatHex functions (#4333)
* enh(NumberFormatter): Introduce backward compatible options for formatHex functions.

* enh(NumberFormatter): Corrections and improvements suggested in code review.

* fix(ci): disable testEncryptDecryptGCM on macOS which often fails.

* enh(NumberFormatter): Improved naming.
2023-12-15 18:30:55 +01:00
Alexander B
a464a4eabf
fic(ci): Properly include openssl 1.1 on macOS (#4345)
* set opessl@1.1 path for macos build

* fix command-line problem
2023-12-15 16:00:26 +01:00
Matej Kenda
214b54460e mingw 11: fixes to compile common libraries 2023-12-14 19:02:11 +01:00
Andrew Auclair
cfc9ce380e
Throw exceptions when node ID retrieval is unsuccessful and support Wireless Adapters on Windows (#4336) 2023-12-14 16:41:28 +01:00
Kari Argillander
708a5d8307
RFC: Remove Windows CE support (#4342)
* Remove _WIN32_WCE macro

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove WinCE support from build files

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. Remove all
references from build systems / scripts.

* Remove Windows CE related source and header files

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove wcelibcex folder

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove rest Windows CE mentions

There where some Windows CE mentions left. Remove those.

* Update Windows CE documentation

We should keep documentation some time so people can find reason for
remove.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-14 00:25:04 +01:00
Kari Argillander
46759cab03
Fix RemoteSyslogChannel setProperty value check (#4339)
We compare just 4 first letters. So if value would have example be
syslevel then this function would work wrong. Nothing major but nice to
fix.

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-13 03:36:37 +01:00
Kari Argillander
10f41c06d9
Improve project C++17 support (#4334)
Poco now use C++17. We can take some old code away because of that. We
also raise requiments for C++17 so everything works as excpected with
it.

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-13 02:16:35 +01:00
Matej Kenda
12a99dcd18 fix(SocketImpl): Windows: use pragma to link mswsock.lib 2023-12-12 22:13:00 +01:00
Matej Kenda
54f0feb282 fix(ci): Partially revert "add sendfile method for streamsocket (#4007)"
This reverts commit 24b7122f43.
2023-12-12 22:13:00 +01:00
Joerg-Christian Boehme
ec3c0f4f98
Github Action for Android NDK (#4321)
* Add first android git hub action to try

* Set up android toolchain

* Add second android ndk build

* add some default settings for android

* Add a third android build for armv7

* fix(OpMsgMessage): android v7a compile

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2023-12-11 20:34:03 +01:00
Matej Kenda
4f1cf68307
Stricter DateTimeParser for known formats (fixes #569) (#4330)
* GH #569: Cherry pick and correct code from devel-experimental.

* GH #569: Add missing timezone codes.

* enh(Foundation): DateTimeParser: stricter checks of timezones, more tests for invalid inputs. (#569)

* enh(Foundation): Small fixes of issues detected by CodeQL

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2023-12-11 14:48:33 +01:00
Alexander B
24b7122f43
add sendfile method for streamsocket (#4007)
* add sendfile method for streamsocket

* add mswsock.lib to the project files and templates

* remove /DPOCO_NO_AUTOMATIC_LIBS for cmake windows build

* merge from upstream

* merge from upstream

* fix code stile
add NotImplemented exception for unsupported platforms
exculude <sys/sendfile.h> for POCO_EMSCRIPTEN, because https://
github.com/emscripten-core/emscripten/pull/16234

* add iostream include for std::cout

* fix compilation for emscripten (wrap sendfile)
2023-12-11 10:47:03 +01:00
Matej Kenda
689a81c4c4 enh(File): Throw FileNotReadyException in File::exists() (Win32) (#2403) 2023-12-11 09:07:45 +01:00
Aleksandar Fabijanic
1e90f64bbf
4307/8/9/10 data races (#4312)
* fix(NumericString): properly mark uIntToString deprecated #4304

* dev(runLibtests): allow to specify test to run

* fix(NotificationCenter): data race #4307

* fix(DirectoryWatcher): data race #4308

* fix(ArchiveStrategy): data race #4309

* fix(ActiveThread): data race #4310

* fix(Task): Cancelled Task shouldn't start running #4311 (WIP)

* fix(String): ignore clang loop unrolling warnings

* fix(TaskManager): task ownership #4311

* chore(FIFOEventTest): fix unused var warning; disable benchmark in test

* fix(Task): remove unnecessary mutex (and prevent cyclic locking reported by TSAN)

* fix(CryptoTest): disable testEncryptDecryptGCM

* fix(ci): typo

* fix(NotificationCenter): disable and clear observers in dtor (#4307)

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2023-12-09 21:16:24 +01:00
Matej Kenda
35e1490b26
fix(platform): Fixes to compile with emscripten 3.1.5 (fixes #2707) (#4318)
* fix(platform): Fixes to compile with emscripten 3.1.5 on Ubuntu 22.04 #2707

* enh(Platform): add test check with emscripten on Linux
2023-12-07 01:48:14 +01:00
Alessandro Zini
e868ecb247
cppignore: add testEchoIPv4Move (#4322) 2023-12-05 19:23:03 +01:00
Matej Kenda
607b0863ce
enh(Foundation): Path of the current process Path::self() (#2282)
* Merge remote-tracking branch 'jackywoo/add_self_to_path' into 2282-path-self
* fix(Foundation): minor code cleanup. #2282
* enh(Foundation): Windows unit test for Path::self and exception for non-implemented platform.
* fix(Foundation): Path::self() throws SystemException when the path can't be acquired. #2282

Co-developed-by: Jackie Woo <wuchienchao@qq.com>
Co-developed-by: Matej Kenda <matejken@gmail.com>
2023-12-05 07:55:07 +01:00
Matej Kenda
0e4eb00ea5 enh(Net): fix a typo 2023-12-04 16:56:12 +01:00
Russell Greene
3ae282db2e
enh(Net): Allow passing raw fd's into ServerSocket (#4156)
* Allow creating ServerSocket's from fd's
* more sensible approach
* fix whitespace issue
* add test
* build fixes for windows
2023-12-04 16:53:40 +01:00
Günter Obiltschnig
94418e5bc8 #4320: Integer overflow in Poco::UTF32Encoding 2023-12-04 15:27:06 +01:00
Matej Kenda
5c9217663e fix(Foundation): Format.h uses Poco::format explicitly to avoid ambiguity with std::format (C++-20). #4028 2023-12-01 09:51:23 +01:00
Matej Kenda
381467d8f5 enh(ci): Add ENABLE_COMPILER_WARNINGS to cmake to enable additional compiler warnings 2023-12-01 08:07:12 +01:00
Matej Kenda
1e4c08b4eb fix(MongoDB): PooledConnection shall have a pointer to a ConnectionPool instead of a reference (fixes clang warning) #4276 2023-11-30 16:40:14 +01:00
Matej Kenda
4cfa96c94e
enh(JSON): Add unit test testBasicJson to test basic functionality of the JSON parser. #3331 (#4315) 2023-11-30 14:53:55 +01:00
Aleksandar Fabijanic
57bc0bbbb5
3102 json lowercase hex (#4306)
* Made it possible to use lowercase hex numbers, also when encoding JSON (#3102)

Co-authored-by: Thomas Weyn <Thomas.Weyn@cebir.be>

* fix(JSONString): Remove deprecated toJSON functions #4305

* fix(NumericString): conversions inconsistencies #4304

---------

Co-authored-by: Archipel <thomas@weynwebworks.com>
Co-authored-by: Thomas Weyn <Thomas.Weyn@cebir.be>
2023-11-27 22:43:20 +01:00
Owen Knight
9141368eca
Make Binding and CopyBinding specializations final (#4022)
The Binding specializations call it virtual functions numOfRowsHandled()
and reset() from their constructors. This is fine assuming virtual
function dispatch to a further derived class was not intended. In this
case the assumption is solid, however this triggers the Clang diagnostic
clang-analyzer-optin.cplusplus.VirtualCall

Adding the final specifyer to these specializations gives Clang enough
of a hint to silence
2023-11-27 03:52:37 +01:00
Aleksandar Fabijanic
862b1ad369
enh(ci): add CIFuzz GitHub action #3882 (#4302) 2023-11-27 03:42:25 +01:00
Aleksandar Fabijanic
cc67fb36ea enh(Ascii): improve performance for toLower/toUpper #3462 2023-11-26 18:56:54 -06:00
Aleksandar Fabijanic
1f4d575465 dev(vscode): add CodeLLDB launchers 2023-11-26 18:55:16 -06:00
tuduongquyet
af69d61ff5
Adding API Poco::XML insertAfterNP() (#4061) 2023-11-26 19:49:50 +01:00
chrisbednarski
388a3b4010
fix openssl session resumption, add quiet shutdown option, support FTPS with hostname (#4103) 2023-11-26 18:12:11 +01:00
Aleksandar Fabijanic
11de40399c
fix(sharedMemory): x64 size error #2976 (#4295)
* fix(sharedMemory): x64 size error #2976

* chore: add Util dependency to Prometheus samples

* fix(HTTPClientSession): not working with UNIX_LOCAL SocketAddress #2578

* fix(WebSocketTest): supress connection reset exception assertion

* fix(PollSet): wait on premature epoll_wait return; reinforce tests for windows

* fix(build): add DataTest dependency to Makefile

* fix(Task): intermittently hanging test and some other improvements

* fix(Net): PollSet loop; suppress test WebSocket handler shutdown IOExeption
2023-11-26 04:57:39 +01:00
Pavle Dragisic
70bb3a40de
Add ProcessRunner and PIDFile (#4225)
* feat(Foundation): PIDFile and ProcessRunner #4064
* feat(Thread): optional signal blocking on POSIX #2978
* fix(ProcessRunner):remove logger, code enhancement #4225
* feat(Foundation): add PIDFile and ProcessRunner Tests #4064
* fix(Foundation): failing ProcessRunner Test #4064
* fix(PIDFile): remove append argument #4064
* remove Windows TODO from ProcessRunner #4064
* feat(ProcessRunnerTest): add line to checkTimeout #4064
* fix(ProcessRunner): add done flag to run() #4064
* fix(ProcessRunnerTest): add missing pidFile argument #4064
* chore(ProcessRunner): remove comments #4064
* fix(ProcessRunner): add runCount flag #4064
* fix(test): SharedLibrary and Class tests paths
* fix(ProcessRunner): thread sanitizer reported data races #4064
* fix(build): pass env var to testrunner #4064
* chore(PIDFile): remove ; in comments #4064
* feat(ProcessRunner): add Win argument format #4064
* fix(Tests): add ProcessRunnerTest to vcxproj #4064
* fix(Tests): change path to TestApp #4064
* feat(Tests): windows processrunner tests #4064
* fix(Tests): duplicate  ProcessRunnerTest in TestSuite vcxproj  #4064
* fix(CodeQL): sw declaration hides variable  #4064
* fix test binaries path for cmake
* fix(Build): missing include/PIDFile.h buildWin #4064
* fix(Build): add PocoFoundation depend in buildWin #4064
* feat(ProcessRunner): test process launching multiple threads #2976

---------

Co-authored-by: Pavle <pavle@debian-gnu-linux-11.localdomain>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2023-11-24 20:22:01 +01:00
Sokolov Yura
904075e1f1
AutoPtr: do 'duplicate' before 'release' (#4068)
Common knowledge in reference counting is "on assignment increment first
then decrement", because "just to be deleted" object could hold last
reference to "just to be assigned" one.

Fixes #3979
2023-11-23 04:49:10 +01:00
Tavi Cacina
b34801f4ba
fix(NetSSL_Win): Error during handshake: failed to read data (#4275)
Closes #3944
2023-11-23 02:57:01 +01:00
Alexander B
4a9285c997
Improve FifoEvent, ActiveMethod, ActiveResult (#4211)
Co-authored-by: Alexander B <bas524@ya.ru>
2023-11-22 00:59:24 +01:00
Pavle Dragisic
f30d759c08
Virtualize ServerApplication::handlePidFile() (#4223)
* feat(OptionSet): Add replaceOption() #4181

* revert changes #4181

* feat: make ServerApplication::handlePidFile virtual #4181

* move handlePidFile() out of ifdef #4181

* fix(ServerApplication): move handlePidFile() out of all ifdefs #4181

---------

Co-authored-by: Pavle <pavle@debian-gnu-linux-11.localdomain>
Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2023-11-21 06:36:36 +01:00
Andrew Auclair
39e35c316d
SplitterChannel::addChannel() should only add a channel once
SplitterChannel::addChannel() should only add a channel once to the internal vector. This prevents issues where the channel is accidentally added twice but only removed once because removeChannel stops at the first result. (#4270)
2023-11-21 04:17:19 +01:00