From patchwork Fri Feb 7 11:06:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 2765 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48DXYf0kDfz3xyK for ; Fri, 7 Feb 2020 11:06:46 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48DXYd12tcz6ck; Fri, 7 Feb 2020 11:06:45 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48DXYc6vP6z2xhJ; Fri, 7 Feb 2020 11:06:44 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48DXYb2vtZz2xgt for ; Fri, 7 Feb 2020 11:06:43 +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) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48DXYZ5f2Jz3C6; Fri, 7 Feb 2020 11:06:42 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581073603; 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=dx2ySphe7dPJQWJB5OVwiq3gAcebsddhsryhOaPGc34=; b=pwOH8pfwplTm8jzrwgt2OOIqORxtiPHT9+xOpi5j8eQPeIE5rlkLD9B1NpukkhPRL/I7Cw FeN4mXOdctcOFxDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581073603; 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=dx2ySphe7dPJQWJB5OVwiq3gAcebsddhsryhOaPGc34=; b=HOSd1tSbLdV6bRqPCE9Ayc4NJE/DhhWJLx3QgDJ3YgwF4akCanrRo6iDElUcFcPRJ30+Rh pOdiQ3sGDK7nEondZGWem7i1ILkysJByQTyxuKJ0LQVrmQunkFZh9gaX8BmtYoC4NaWbjX YfxhYKDwGHaZEfCFw+bnzjwfWizIBEwhTLmUDwXiXE2m1Jc6RtWic66Y6/ta6dvPkw4XSC XRyqXTLJDvGgq8V9n1FmGvGMMfFpt9t+0Bw2D7oqv0D+JzRVqd8dmOAEFdaPoNmFAHWtYx K5PKL0/UMrrJoKHxHb4vm3xBz8by7EeJPPaCPFAnzj3HiH5Y6D3aestG4Ix9dQ== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] proxy.cgi: Switch to MD5 hashed passwords for local user auth. Date: Fri, 7 Feb 2020 12:06:39 +0100 Message-Id: <20200207110640.5264-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=stefan.schantl@ipfire.org 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" The former used default Crypt algorithmus only supports passwords up to eight signs wheater MD5 does not have any limitation here. Fixes 12290. Signed-off-by: Stefan Schantl Reviewed-by: Michael Tremer --- html/cgi-bin/proxy.cgi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index b63964081..06aca579b 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -3945,7 +3945,13 @@ sub adduser } else { &deluser($str_user); - my $htpasswd = new Apache::Htpasswd("$userdb"); + my %htpasswd_options = ( + passwdFile => "$userdb", + UseMD5 => 1, + ); + + my $htpasswd = new Apache::Htpasswd(\%htpasswd_options); + $htpasswd->htpasswd($str_user, $str_pass); }