fix Jenkins provision regex escaping
This commit is contained in:
@@ -66,7 +66,7 @@ pipeline {
|
|||||||
if (!params.PROVISION_TOOLS_DIR?.trim()) {
|
if (!params.PROVISION_TOOLS_DIR?.trim()) {
|
||||||
error('PROVISION_TOOLS_DIR 不能为空。')
|
error('PROVISION_TOOLS_DIR 不能为空。')
|
||||||
}
|
}
|
||||||
if (!(params.PROVISION_TOOLS_DIR.trim() ==~ /^[0-9A-Za-z._/-]+$/) || params.PROVISION_TOOLS_DIR.startsWith('/') || params.PROVISION_TOOLS_DIR.contains('..')) {
|
if (!(params.PROVISION_TOOLS_DIR.trim() ==~ /^[0-9A-Za-z._\/-]+$/) || params.PROVISION_TOOLS_DIR.startsWith('/') || params.PROVISION_TOOLS_DIR.contains('..')) {
|
||||||
error("PROVISION_TOOLS_DIR 只能是工作区内的相对目录,不能包含绝对路径或连续点号: ${params.PROVISION_TOOLS_DIR}")
|
error("PROVISION_TOOLS_DIR 只能是工作区内的相对目录,不能包含绝对路径或连续点号: ${params.PROVISION_TOOLS_DIR}")
|
||||||
}
|
}
|
||||||
if (!(params.OTELCOL_VERSION?.trim() ==~ /^[0-9]+\.[0-9]+\.[0-9]+$/)) {
|
if (!(params.OTELCOL_VERSION?.trim() ==~ /^[0-9]+\.[0-9]+\.[0-9]+$/)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user