diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2016-07-13 15:23:29 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2016-07-13 15:41:57 (GMT) |
commit | 9b588b2bdfc93d5cb0fe0c1753971e987addf68a (patch) | |
tree | 2206b3f2e9c60ac4b1589671851efd89112c9967 /Modules/ExternalData.cmake | |
parent | 507aa256e517e33aa109b854b444b08863447cf4 (diff) | |
download | CMake-9b588b2bdfc93d5cb0fe0c1753971e987addf68a.zip CMake-9b588b2bdfc93d5cb0fe0c1753971e987addf68a.tar.gz CMake-9b588b2bdfc93d5cb0fe0c1753971e987addf68a.tar.bz2 |
ExternalData: Hide security-sensitive details from output
Do not disclose credentials when printing URIs used to fetch external resources.
Diffstat (limited to 'Modules/ExternalData.cmake')
-rw-r--r-- | Modules/ExternalData.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake index a3f460d..02d2b15 100644 --- a/Modules/ExternalData.cmake +++ b/Modules/ExternalData.cmake @@ -971,7 +971,8 @@ function(_ExternalData_download_object name hash algo var_obj) set(url "${lhs}${algo}${rhs}") endif() endif() - message(STATUS "Fetching \"${url}\"") + string(REGEX REPLACE "((https?|ftp)://)([^@]+@)?(.*)" "\\1\\4" secured_url "${url}") + message(STATUS "Fetching \"${secured_url}\"") if(url MATCHES "^ExternalDataCustomScript://([A-Za-z_][A-Za-z0-9_]*)/(.*)$") _ExternalData_custom_fetch("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}" "${tmp}" err errMsg) else() |