From nobody Tue Mar 19 14:20:38 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TzYm65rP9z5FRHv; Tue, 19 Mar 2024 14:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TzYm64fMlz47Hd; Tue, 19 Mar 2024 14:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710858038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EA4PjcHvOcIpgTxa7H/adNKwL9zlImZE4h2InaBkfEo=; b=OIOw4mj4CFlQ9ufe2k2IAYea8S0RMQ33NDLYRQcCg8EmQ9kDHMHQwUN963hdxFfGfEZTBB ahYu2UW8RDSsLkQjvJDNHLlZLEKUgY8qgqCwpTcMO49KZNNSdlnXtbsGY86AeXDXO+6+71 dZhGJUBlzfy0SmnKQfKeABPtrCb3GgbyKlZ6qcVL9xijkyTxpvZCy3uRe+ve6TRG8vnrcz 7XChpQxg3dF/1ShZRZMSRpPyHwiATQpwqZ6EIGfJUSeGGLG4EaDYIgf5HaI2dZzlHvxxlH 2X2EyPIhm7kmxElV76PkArMlImCOkq7nQNcVXjzauLND73YWdqPLamTm1QmrHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710858038; a=rsa-sha256; cv=none; b=ls8s9swU9IuC+jEwXDdrR9EQ0t2gnRWSxQ+FZT5GM5sar48ufsajVpTP9EpA3b1/9NMHku Gm8XawVTo8UgxQrMVrHo+iiciI4WXTvHGaGzp9mdRZZ59KEj+YEbWZHehIL30NNnIX8GiX H1zL+EnskQYzg2kBVX+xyIhkrwAA0z/g03oWc+5PGlMHcljGdLPSY/wUI/A32P075ncvFH d8b1x1/c+wMNCXQsvU7/+nHXZjPl3bfDW3A27UIIatRSPzqqxHjmAZppdZSke7+UnnyaHc hUkdXmDgP0ugCUGkVjB4+kRHGBj2qBycCvL9UJFoVh+6z0d4DREBKRofYWyhVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710858038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EA4PjcHvOcIpgTxa7H/adNKwL9zlImZE4h2InaBkfEo=; b=loDSgCv1xJ8xyxQQ8zkz1e/wJhb25E/nFsBEAvnOOy7DeYn5tVMAYGpYbuIX1CdJ5ttl91 VXUTlWHPFx21KThRX4vP7jfP6/Da80QMH8hRGqJ1BSbaFEU3UDDHAIOUbK7svV9mYRWNg5 dy9Us0a634prolOtvAgJUqW6uznmWcebV/cMHMYv/3K4mib6bp86AQrJgu69YPHOeDzm32 IGnX2WNUJ7hPqt78E9wTW4at++KAnrUfCITc0BAZHuAm6bjbmzdYKbcjFCAVUzt+IXN447 NJAkL1ar3vxBBOTNTZ3CIZ9I+gvlVachwMYAmj/db2wCBPxZPxinvqu/hCAM+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TzYm64Cj4z197w; Tue, 19 Mar 2024 14:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42JEKcjh075863; Tue, 19 Mar 2024 14:20:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42JEKcWo075860; Tue, 19 Mar 2024 14:20:38 GMT (envelope-from git) Date: Tue, 19 Mar 2024 14:20:38 GMT Message-Id: <202403191420.42JEKcWo075860@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 7873631186c8 - main - security/crowdsec-firewall-bouncer: fix file quoting List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7873631186c85b4d5bdcffa307f9dd49155c36c0 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=7873631186c85b4d5bdcffa307f9dd49155c36c0 commit 7873631186c85b4d5bdcffa307f9dd49155c36c0 Author: marco AuthorDate: 2024-01-03 12:03:52 +0000 Commit: Robert Clausecker CommitDate: 2024-03-19 14:18:50 +0000 security/crowdsec-firewall-bouncer: fix file quoting When the api key contains a '/' character, if the yaml field is not quoted it will include the comment as well. fix: quote the field and remove the comment with the bouncer name. PR: 276096 MFH: 2024Q1 --- security/crowdsec-firewall-bouncer/Makefile | 2 +- security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/security/crowdsec-firewall-bouncer/Makefile b/security/crowdsec-firewall-bouncer/Makefile index c07268416620..021a2a0f7078 100644 --- a/security/crowdsec-firewall-bouncer/Makefile +++ b/security/crowdsec-firewall-bouncer/Makefile @@ -1,5 +1,5 @@ PORTNAME= crowdsec-firewall-bouncer -PORTREVISION= 3 +PORTREVISION= 4 DISTVERSIONPREFIX= v DISTVERSION= 0.0.28 CATEGORIES= security diff --git a/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in b/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in index 78fed46c27f2..47c4c25cfae1 100644 --- a/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in +++ b/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in @@ -49,7 +49,7 @@ crowdsec_firewall_precmd() { # THEN, register it to the local API API_KEY=$($CSCLI bouncers add "${crowdsec_firewall_name}" -o raw) if [ -n "$API_KEY" ]; then - sed -i "" "s|^${orig_line}|api_key: ${API_KEY} # ${crowdsec_firewall_name}|" "${crowdsec_firewall_config}" + sed -i "" "s|^${orig_line}|api_key: '${API_KEY}'|" "${crowdsec_firewall_config}" echo "Registered: ${crowdsec_firewall_name}" fi fi @@ -85,6 +85,7 @@ crowdsec_firewall_stop() crowdsec_firewall_start() { # ensure we have a backend if the config file was not patched export BACKEND=pf + # shellcheck disable=SC2086 /usr/sbin/daemon -f -p "$pidfile" -t "$desc" -- \ "$command" -c "$crowdsec_firewall_config" ${crowdsec_firewall_flags} }