From patchwork Fri Jul 30 17:57:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 4579 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Gbw8W70ZYz3xGs for ; Fri, 30 Jul 2021 17:57:15 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Gbw8T373fz1Ts; Fri, 30 Jul 2021 17:57:13 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Gbw8S5gk4z2xlJ; Fri, 30 Jul 2021 17:57:12 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Gbw8R27BKz2xPQ for ; Fri, 30 Jul 2021 17:57:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Gbw8Q3qWNz2q; Fri, 30 Jul 2021 17:57:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1627667830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=d0m9kJuMWnniuRD26400MlsGAaWNR20/BOTbFLoX6Dw=; b=bFhNpMem6n0RvUdIFpZMesE0M7zKGEUcSfx8R6B/jV9/y2Mr6LCY4GV8uRcdI1vGPMyH3g 0UtOffDUZ7iM5MAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1627667830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=d0m9kJuMWnniuRD26400MlsGAaWNR20/BOTbFLoX6Dw=; b=ub655FWb/nKHVedhhn5ZQ1vjpKX7vFRNyRfb1MVZJtxiAp3svcsCJOTLTREg6aHlzP+uCE eOV1zyz2pUDJeAS3Oc6zKUucHjWS4XmINLO0yRLL8SUp9txpcVmAxvZpUm2K0l5yF6L32C AwLSdp37oCbwUn2k0n89Ly/TVJGrfTdJRu3exh5/yta4gcJaaaQ13UJlILmuMD/TgN1LOR Ed4fqbRJXGmopykq5q2Gcqq876CA66Gcal1Ks0af6dvZj9TWSZzvBx1c9tEXiZvRz1wOCv t99fRshdpCDqWG7ru41dlntMM5DjYeFCXte58JBvBcGtyEBV5OQS2phTYBzKXg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] qos.cgi: Fix truncated status output Date: Fri, 30 Jul 2021 19:57:01 +0200 Message-Id: <20210730175701.2930-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" In the past only the fist line of the status output has been passed to the cleanhtml() function and displayed. Now the whole output will be converted to a string, cleaned and displyed on the WUI again. Fixes #12666. Signed-off-by: Stefan Schantl Reviewed-by: Bernhard Bitsch Reviewed-by: Michael Tremer --- html/cgi-bin/qos.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi index fa566b523..d768f95f5 100644 --- a/html/cgi-bin/qos.cgi +++ b/html/cgi-bin/qos.cgi @@ -543,7 +543,7 @@ elsif ($qossettings{'ACTION'} eq $Lang::tr{'status'} ) if ($qossettings{'ENABLED'} eq 'on'){ my $output = ""; my @output = &General::system_output("/usr/local/bin/qosctrl", "status"); - $output = &Header::cleanhtml(@output[0],"y"); + $output = &Header::cleanhtml(join("", @output), "y"); print "
$output
\n"; } else { print "$Lang::tr{'QoS not enabled'}"; } &Header::closebox();