From patchwork Tue May 6 14:10:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8704 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 (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ZsKzm4crPz3xDv for ; Tue, 6 May 2025 14:10:28 +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 RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ZsKzj45vdz6Ts for ; Tue, 6 May 2025 14:10:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZsKzj18XBz33gT for ; Tue, 6 May 2025 14:10:25 +0000 (UTC) X-Original-To: development@lists.ipfire.org 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 (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZsKzf1kclz33BR for ; Tue, 6 May 2025 14:10:22 +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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ZsKzf09KYz2X6; Tue, 6 May 2025 14:10:21 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1746540622; 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: in-reply-to:in-reply-to:references:references; bh=spJk/+sSBAPI9vn676eLXmmj5AcTRYJ4Iqtgyvp8cUQ=; b=pky4w53DnT6Jabl735gjiVFDyEeYYk+UfVpQ6dzir8y8Y0t7gc5v4Ti3wO9i8KeRwrhN6t JoWMdLFTf1UwjEAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1746540622; 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: in-reply-to:in-reply-to:references:references; bh=spJk/+sSBAPI9vn676eLXmmj5AcTRYJ4Iqtgyvp8cUQ=; b=adOcctqnNfCipfpJKPdgpSlTjnpzpZOtP1bPWoJoRaK5rNpXdNmOmL75lPFyuZL/pDEA/k wLIHVnVs/c+33p81CVhXGQ7rBFL3sr60OImtUNqLYSfnWEQxOGmVIVpF1B3xAtG47Afib9 xuoXp7vMISOhI/C/MPg0BxuO+bDGj/jMmHX1Lco3zI/yjccCpfw/oFds5VgFE89MIkJxrW mYTeR+rQZBTl1jUJ3V4VGnH6s8XhRRP8cVJ7SnknaJImfZUStpdQo4Ej+OwtmTbjGcBABk NBdFJqdDi8hxunBp0KR/ov8pvXjaPRSv4vfh2zpcPZ4mYEtZb0snyCbTbYaNzA== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 2/5] proxy.cgi: Fixes bug12755 - proxy auth problem with password longer than 8 chars Date: Tue, 6 May 2025 16:10:10 +0200 Message-ID: <20250506141013.15292-2-adolf.belka@ipfire.org> In-Reply-To: <20250506141013.15292-1-adolf.belka@ipfire.org> References: <20250506141013.15292-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - This makes the proxy local password management the same between chpasswd.cgi and proxy.cgi - Tested out on my vm testbed and was able to create and modify users and their passwords in the proxy.cgi page or modify a password for a specified user on the chpasswd.cgi page. This all happened successfully and was confirmed by testing out the local authentication. Fixes: bug12755 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- html/cgi-bin/proxy.cgi | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index c8e3576df..bdce2fa66 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2021 IPFire Team # +# Copyright (C) 2007-2025 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -20,7 +20,6 @@ ############################################################################### use strict; -use Apache::Htpasswd; use Scalar::Util qw(looks_like_number); # enable only the following on debugging purpose @@ -4050,15 +4049,7 @@ sub adduser close(FILE); } else { &deluser($str_user); - - my %htpasswd_options = ( - passwdFile => "$userdb", - UseMD5 => 1, - ); - - my $htpasswd = new Apache::Htpasswd(\%htpasswd_options); - - $htpasswd->htpasswd($str_user, $str_pass); + &General::system("/usr/bin/htpasswd", "-bB", "-C 10", "$userdb", "$str_user", "$str_pass"); } if ($str_group eq 'standard') { open(FILE, ">>$stdgrp");