10 Commits

Author SHA1 Message Date
Vincent Li
993dbbbd75 chpasswd.cgi: Fixes bug12755
commit a461fd70445aec9dfa34bf9c5a29a85e0ad0e2fe
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Sat May 10 12:30:56 2025 +0200

    chpasswd.cgi: Fixes bug12755 - v3 with password verification correction

    - v3 version based on feedback from @Michael to use the status value returned from
       using the htpasswd command.
    - Also simplified the whole section to carry out the change if the status is 0, ie all
       went well, otherwise give an error but without identifying if the error is in the
       username or the password. This makes it more secure as any attacker only knows it
       failed and doesn't know if any part of the authentication was correct or not.
    - Changed the error messages in line with this so the language file changes are in the
       other part of this patch set submission.
    - Tested out on my vm test bed and worked fine. If the username was incorrect or the
       password was incorrect or both were incorrect the same error message is given. If
       both are correct then the update is carried out.

    Fixes: bug12755
    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 9c0dab3d3ca807e836823253aced80a14bc1970a
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed May 7 09:06:12 2025 +0000

    chpasswd.cgi: Add missing $

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 4c39e38f90fea60ef62e07267fd84f1b89de0297
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Tue May 6 16:10:11 2025 +0200

    chpasswd.cgi: Make swroot refs the same as for other cgi files

    - This uses the swroot definition from general-functions.pl and makes the definition
       the same as used in the majority of other IPFire cgi files.

    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 6c1549ff7a9c8e3f9f17a29a6b169fce175fea42
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Tue May 6 16:10:09 2025 +0200

    chpasswd.cgi: Fixes bug12755 - proxy auth password problem longer than 8 chars

    - The existing version of the perl module Apache::Htpasswd was using the crypt hash for
       the password hashing, which is very insecure. The only alternative with this module
       is the md5 and sha1 hashes which are also considered weak now.
    - The module was last updated in Nov 2012 and there is no alternative module available.
    - This patch replaces that perl module with using the apache htpasswd program. This can
       be set to use the bcrypt hash which is considered secure. This is used for the
       generation of the root and admin passwords during the IPFire install.
    - Tested out on my vm testbed system and the password for a specific user name was
       changed successfully without any restriction to the length of the password.
    - Existing passwords with the existing md5 or crypt options will still work as htpasswd
       can manage different encoding hashes in the one file.

    Fixes: bug12755
    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 22:09:46 +00:00
Peter Müller
66c3619872 Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I
thought it might be a good idea to clean these up. Doing so, some
missing or inconsistent licence headers were fixed.

There is no need in shipping all these files en bloc, as their
functionality won't change.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 23:54:57 +00:00
Michael Tremer
0aff7b8196 {proxy,chpasswd}.cgi: Fix a remote code execution vulnerability
Handcrafted requests with shell commands could be sent to these
CGI files and gain shell access as unprivileged user.

References: #11087

Reported-by: Yann Cam <yann.cam@gmail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-04-08 15:54:53 +01:00
Arne Fitzenreiter
18e7404874 chpasswd.cgi: fixed for new MD5 password hashes. 2012-01-21 20:13:54 +01:00
Arne Fitzenreiter
bb2795c789 Fix cgi permissions. 2009-11-29 14:34:11 +01:00
Jan Paul Tuecking
5be3900c32 Redesigned chpasswd.cgi 2009-11-27 23:59:53 +01:00
Christian Schmidt
8fb1a115bd Fixed 2 CGIs for core31 2009-08-29 21:48:45 +02:00
ms
70df830214 Ein Paar Dateien fuer die GPLv3 angepasst.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@853 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-08-29 13:25:32 +00:00
ms
363fb6afce Geaendert:
* Squid auf neuesten Stand gebracht.
  * QoS-Fortschritt.
  * Kleines Script fuer Sprachdateiupdates.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@268 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-09-10 19:52:20 +00:00
ms
ed38f89d27 Hinzugefügt:
* AdvancedProxy Fähigkeiten
Geändert:
  * Kleiner Fehler im OpenVPN GUI verblieben und daher behoben.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@153 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-06-02 19:03:53 +00:00