Merge branch 'poco-1.9.1' of https://github.com/pocoproject/poco into poco-1.9.1

This commit is contained in:
Günter Obiltschnig 2019-06-23 21:25:44 +02:00
commit 5c81da17b7
8 changed files with 77 additions and 26 deletions

View File

@ -3,6 +3,18 @@ This is the changelog file for the POCO C++ Libraries.
Release 1.9.1 (2019-06-24)
==========================
- Added support for building with different OpenSSL distributions on Windows.
See the POCO_EXTERNAL_OPENSSL macro defined in Foundation/include/Poco/Config.h
for options.
- Added Poco::Net::HTTPClientSession::flushRequest()
- Added Poco::Net::WebSocket::setMaxPayloadSize() and Poco::Net::WebSocket::getMaxPayloadSize()
to specify a maximum acceptable payload size for Poco::Net::WebSocket::receiveFrame().
- Redis: added support for additional commands (exists, expire, ping, multi, exec, discard)
- Redis: added Poco::Redis::Client::isConnected()
- Upgraded bundled PCRE to version 8.43
- Upgraded bundled SQLite to version 3.28.0
- Added project/solution files for Visual Studio 2019
- Fixed Visual Studio project files (version information from DLLVersion.rc not included in DLLs)
- fixed GH #2220: Encoding/DoubleByteEncoding.cpp fails to compile with VS2008 and _DEBUG
- fixed GH #2277: SQLite null pointer dereference occurs when exception is being thrown
- fixed GH #2313: PollSet behaves differently on windows
@ -15,21 +27,11 @@ Release 1.9.1 (2019-06-24)
- fixed GH #2549: Fix keepAlive in http client session
- fixed GH #2570: DialogSocket: receiveStatusMessage() - line length limit applies to entire multi-line message
- fixed GH #2583: Crypto library does not build with OpenSSL 1.0.0
- fixed GH #2583: Crypto library does not build with OpenSSL 1.0.0 (backport)
- fixed GH #2655: MongoDB Binary element to string - bug
- fixed GH #2661: Poco::Zip::ZipArchive cannot load new tomcat.zip file
- fixed GH #2700: Invalid read of memory in Poco::Environment::set which may cause crashes.
- fixed GH #2712: File_WIN32.cpp(168): error C2065: “_upath”:Undeclared identifier
- Added support for building with different OpenSSL distributions on Windows.
See the POCO_EXTERNAL_OPENSSL macro defined in Foundation/include/Poco/Config.h
for options.
- Added Poco::Net::HTTPClientSession::flushRequest()
- Added Poco::Net::WebSocket::setMaxPayloadSize() and Poco::Net::WebSocket::getMaxPayloadSize()
to specify a maximum acceptable payload size for Poco::Net::WebSocket::receiveFrame().
- Redis: added support for additional commands (exists, expire, ping, multi, exec, discard)
- Redis: added Poco::Redis::Client::isConnected()
- Upgraded bundled PCRE to version 8.43
- Upgraded bundled SQLite to version 3.28.0
- fixed GH #2723: Access violation when trying to decompress .zip file with unsupported compression method.
Release 1.9.0 (2018-03-07)

View File

@ -134,6 +134,7 @@
#define POCO_ARCH_NIOS2 0x0e
#define POCO_ARCH_AARCH64 0x0f
#define POCO_ARCH_ARM64 0x0f // same as POCO_ARCH_AARCH64
#define POCO_ARCH_RISCV64 0x10
#if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA)
@ -224,13 +225,16 @@
#elif defined(__AARCH64EB__)
#define POCO_ARCH POCO_ARCH_AARCH64
#define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__riscv) && (__riscv_xlen == 64)
#define POCO_ARCH POCO_ARCH_RISCV64
#define POCO_ARCH_LITTLE_ENDIAN 1
#endif
#if defined(_MSC_VER)
#define POCO_COMPILER_MSVC
#elif defined(__clang__)
#if defined(__clang__)
#define POCO_COMPILER_CLANG
#elif defined(_MSC_VER)
#define POCO_COMPILER_MSVC
#elif defined (__GNUC__)
#define POCO_COMPILER_GCC
#elif defined (__MINGW32__) || defined (__MINGW64__)

View File

@ -85,6 +85,8 @@ public:
bool isEncrypted() const;
bool hasSupportedCompressionMethod() const;
const Poco::DateTime& lastModifiedAt() const;
Poco::UInt32 getCRC() const;
@ -367,6 +369,13 @@ inline bool ZipLocalFileHeader::isEncrypted() const
}
inline bool ZipLocalFileHeader::hasSupportedCompressionMethod() const
{
ZipCommon::CompressionMethod method = getCompressionMethod();
return method == ZipCommon::CM_DEFLATE || method == ZipCommon::CM_STORE;
}
inline void ZipLocalFileHeader::setEncryption(bool val)
{
if (val)

View File

@ -22,6 +22,7 @@
#include "Poco/StreamCopier.h"
#include "Poco/Delegate.h"
#include "Poco/FileStream.h"
#include "Poco/Format.h"
namespace Poco {
@ -107,7 +108,14 @@ bool Decompress::handleZipEntry(std::istream& zipStream, const ZipLocalFileHeade
}
if (!ZipCommon::isValidPath(fileName))
{
throw ZipException("Illegal entry name", fileName);
}
if (!hdr.hasSupportedCompressionMethod())
{
throw ZipException(Poco::format("Unsupported compression method (%d)", static_cast<int>(hdr.getCompressionMethod())), fileName);
}
Poco::Path file(fileName);
file.makeFile();

View File

@ -21,6 +21,7 @@
#include "Poco/Exception.h"
#include "Poco/InflatingStream.h"
#include "Poco/DeflatingStream.h"
#include "Poco/Format.h"
#if defined(POCO_UNBUNDLED)
#include <zlib.h>
#else
@ -80,7 +81,6 @@ ZipStreamBuf::ZipStreamBuf(std::istream& istr, const ZipLocalFileHeader& fileEnt
_ptrBuf = new PartialInputStream(istr, start, end, reposition);
}
}
else throw Poco::NotImplementedException("Unsupported compression method");
}
@ -299,6 +299,10 @@ ZipStreamBuf* ZipIOS::rdbuf()
ZipInputStream::ZipInputStream(std::istream& istr, const ZipLocalFileHeader& fileEntry, bool reposition): ZipIOS(istr, fileEntry, reposition), std::istream(&_buf)
{
if (!fileEntry.hasSupportedCompressionMethod())
{
throw ZipException(Poco::format("Unsupported compression method (%d)", static_cast<int>(fileEntry.getCompressionMethod())), fileEntry.getFileName());
}
}

2
build_vs160.cmd Normal file
View File

@ -0,0 +1,2 @@
@echo off
buildwin 160 build shared both Win32 samples tests devenv

View File

@ -5,9 +5,9 @@ rem
rem buildwin.cmd
rem
rem POCO C++ Libraries command-line build script
rem for MS Visual Studio 2008 to 2013
rem for MS Visual Studio 2008 to 2019
rem
rem Copyright (c) 2006-2017 by Applied Informatics Software Engineering GmbH
rem Copyright (c) 2006-2019 by Applied Informatics Software Engineering GmbH
rem and Contributors.
rem
rem Original version by Aleksandar Fabijanic.
@ -16,7 +16,7 @@ rem
rem Usage:
rem ------
rem buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL]
rem VS_VERSION: 90|100|110|120|140|150
rem VS_VERSION: 90|100|110|120|140|150|160
rem ACTION: build|rebuild|clean
rem LINKMODE: static_mt|static_md|shared|all
rem CONFIGURATION: release|debug|both
@ -44,13 +44,17 @@ set LIB=%LIB%;%MYSQL_LIB%
set POCO_BASE=%CD%
set PATH=%POCO_BASE%\bin64;%POCO_BASE%\bin;%PATH%
rem VS_VERSION {90 | 100 | 110 | 120 | 140 | 150}
rem VS_VERSION {90 | 100 | 110 | 120 | 140 | 150 | 160}
if "%1"=="" goto usage
set VS_VERSION=vs%1
if %VS_VERSION%==vs150 (
if %VS_VERSION%==vs160 (
set VS_VARSALL=..\..\VC\Auxiliary\Build\vcvarsall.bat
) else (
set VS_VARSALL=..\..\VC\vcvarsall.bat
if %VS_VERSION%==vs150 (
set VS_VARSALL=..\..\VC\Auxiliary\Build\vcvarsall.bat
) else (
set VS_VARSALL=..\..\VC\vcvarsall.bat
)
)
rem PLATFORM [Win32|x64|WinCE|WEC2013]
set PLATFORM=%5
@ -102,6 +106,14 @@ if not defined VCINSTALLDIR (
) else (
call "%VS150COMNTOOLS%%VS_VARSALL%" x86 8.1
)
) else (
if %VS_VERSION%==vs160 (
if %PLATFORM%==x64 (
call "%VS160COMNTOOLS%%VS_VARSALL%" x86_amd64 8.1
) else (
call "%VS160COMNTOOLS%%VS_VARSALL%" x86 8.1
)
)
)
)
)
@ -123,6 +135,7 @@ if %VS_VERSION%==vs110 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs120 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs140 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs150 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs160 (set VCPROJ_EXT=vcxproj)
if "%8"=="" goto use_devenv
set BUILD_TOOL=%8
@ -134,6 +147,7 @@ if "%VS_VERSION%"=="vs110" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs120" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs140" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs150" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs160" (set BUILD_TOOL=msbuild)
:use_custom
if not "%BUILD_TOOL%"=="msbuild" (set USEENV=/useenv)
if "%BUILD_TOOL%"=="msbuild" (
@ -150,6 +164,7 @@ if "%VS_VERSION%"=="vs110" (goto msbuildok)
if "%VS_VERSION%"=="vs120" (goto msbuildok)
if "%VS_VERSION%"=="vs140" (goto msbuildok)
if "%VS_VERSION%"=="vs150" (goto msbuildok)
if "%VS_VERSION%"=="vs160" (goto msbuildok)
if "%BUILD_TOOL%"=="msbuild" (
echo "Cannot use msbuild with Visual Studio 2008 or earlier."
exit /b 2
@ -194,6 +209,7 @@ if %VS_VERSION%==vs110 (set EXTRASW=/m /p:VisualStudioVersion=11.0)
if %VS_VERSION%==vs120 (set EXTRASW=/m /p:VisualStudioVersion=12.0)
if %VS_VERSION%==vs140 (set EXTRASW=/m /p:VisualStudioVersion=14.0)
if %VS_VERSION%==vs150 (set EXTRASW=/m /p:VisualStudioVersion=15.0)
if %VS_VERSION%==vs160 (set EXTRASW=/m /p:VisualStudioVersion=16.0)
)
rem SAMPLES [samples|nosamples]

View File

@ -4,7 +4,7 @@
# Usage:
# ------
# buildwin.ps1 [-poco_base dir]
# [-vs_version 150 | 140 | 120 | 110 | 100 | 90]
# [-vs_version 160 | 150 | 140 | 120 | 110 | 100 | 90]
# [-action build | rebuild | clean]
# [-linkmode shared | static_mt | static_md | all]
# [-config release | debug | both]
@ -23,7 +23,7 @@ Param
[string] $poco_base,
[Parameter()]
[ValidateSet(90, 100, 110, 120, 140, 150)]
[ValidateSet(90, 100, 110, 120, 140, 150, 160)]
[int] $vs_version,
[Parameter()]
@ -78,7 +78,8 @@ function Set-Environment
if ($vs_version -eq 0)
{
if ($Env:VS150COMNTOOLS -ne '') { $script:vs_version = 150 }
if ($Env:VS160COMNTOOLS -ne '') { $script:vs_version = 160 }
elseif ($Env:VS150COMNTOOLS -ne '') { $script:vs_version = 150 }
elseif ($Env:VS140COMNTOOLS -ne '') { $script:vs_version = 140 }
elseif ($Env:VS120COMNTOOLS -ne '') { $script:vs_version = 120 }
elseif ($Env:VS110COMNTOOLS -ne '') { $script:vs_version = 110 }
@ -120,7 +121,12 @@ function Set-Environment
$CommandArg = ''
if ($platform -eq 'x64') { $CommandArg = "amd64" }
else { $CommandArg = "x86" }
if ($vs_version -ge 150)
if ($vs_version -ge 160)
{
$Command = "$($vsdir)\..\..\VC\Auxiliary\Build\vcvarsall.bat"
$script:msbuild_exe = "$($vsdir)\..\..\MSBuild\Current\Bin\MSBuild.exe"
}
elseif ($vs_version -ge 150)
{
$Command = "$($vsdir)\..\..\VC\Auxiliary\Build\vcvarsall.bat"
$script:msbuild_exe = "$($vsdir)\..\..\MSBuild\15.0\Bin\MSBuild.exe"
@ -149,7 +155,7 @@ function Process-Input
Write-Host 'Usage:'
Write-Host '------'
Write-Host 'buildwin.ps1 [-poco_base dir]'
Write-Host ' [-vs_version 150 | 140 | 120 | 110 | 100 | 90]'
Write-Host ' [-vs_version 160 | 150 | 140 | 120 | 110 | 100 | 90]'
Write-Host ' [-action build | rebuild | clean]'
Write-Host ' [-linkmode shared | static_mt | static_md | all]'
Write-Host ' [-config release | debug | both]'