mirror of
https://github.com/reactos/CMake.git
synced 2024-12-12 13:56:00 +00:00
CPack/Deb: fix for regex passing even if invalid characters are present
Regex [+-~] passes all characters between + and ~ and not only +, - and ~
This commit is contained in:
parent
529729d6e7
commit
c5db2f9a0f
@ -764,9 +764,9 @@ function(cpack_deb_prepare_package_vars)
|
||||
if(DEFINED CPACK_DEBIAN_PACKAGE_RELEASE OR DEFINED CPACK_DEBIAN_PACKAGE_EPOCH)
|
||||
# only test the version format if CPACK_DEBIAN_PACKAGE_RELEASE or
|
||||
# CPACK_DEBIAN_PACKAGE_EPOCH is set
|
||||
if(NOT CPACK_DEBIAN_PACKAGE_VERSION MATCHES "^[0-9][A-Za-z0-9.+-~]*$")
|
||||
if(NOT CPACK_DEBIAN_PACKAGE_VERSION MATCHES "^[0-9][A-Za-z0-9.+~-]*$")
|
||||
message(FATAL_ERROR
|
||||
"CPackDeb: Debian package version must confirm to \"^[0-9][A-Za-z0-9.+-~]*$\" regex!")
|
||||
"CPackDeb: Debian package version must confirm to \"^[0-9][A-Za-z0-9.+~-]*$\" regex!")
|
||||
endif()
|
||||
else()
|
||||
# before CMake 3.10 version format was not tested so only warn to preserve
|
||||
|
Loading…
Reference in New Issue
Block a user