Commit Graph

2968 Commits

Author SHA1 Message Date
Stefan Schantl
66cb52cb0d extrahd.cgi: Fix broken UUID check
This check was totaly broken and resulted into not beeing able to
configure/mount more than one extra harddrive.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-09-13 09:28:25 +00:00
Adolf Belka
9149276b65 index.cgi: Add warning about reiserfs deprecation and removal if reiserfs used
- Reiserfs was stopped in IPFire in Core Update 167. It has been announced that reiserfs
   will be removed from the kernel in 2025.
- This patch gives a warning about this deprecation and removal if reiserfs is used. The
   warning also requests that the user does a re-installation using either ext4 or xfs
   filesystems.
- Tested out on a vm installation with reiserfs, ext4 and xfs. Messgae shown on system
   with reiserfs filesystem but nopt on the other two.
- Warning message added into the English language file and ./make.sh lang run.

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>
2023-08-21 09:25:34 +00:00
Michael Tremer
c4710adcbc Update credits.cgi
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-16 15:04:02 +00:00
Peter Müller
8494102aa8 vulnerabilities.cgi: Avoid superfluous line breaks by widening SMT configuration table
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-15 16:48:55 +00:00
Peter Müller
edc78459ef vulnerabilities.cgi: Add English and German translations for new flaws
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-15 16:48:55 +00:00
Arne Fitzenreiter
cd78363404 Merge remote-tracking branch 'origin/master' into next
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2023-08-12 16:48:54 +02:00
Arne Fitzenreiter
6e16017fc0 vulnerabilities.cgi: add new gather_data_sampling and spec_rstack_overfow
this not add details and translation strings yet.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2023-08-11 23:29:26 +02:00
Adolf Belka
d4c30a95e7 fwhosts.cgi: Fixes bug#13206 - no validation of location group name
- Added validation code for the location group name. This is only validated when edited
   and not when created.
- The code was copied from the section for creating the Services Group Name or the
   Network/Host Group Name.

Fixes: Bug#13206
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-07 09:24:36 +00:00
Adolf Belka
cee7ddb66c samba.cgi: Fixes bug#13193 - disables smb1 unix extensions in smb.conf
- Around three years ago the samba wui page was simplified and several parts were removed
   including the ability to set either wide links or unix extensions to be enabled
- When the above was done wide links = yes was defined in the samba.cgi code
- unix extenstions was not defined and therefore took the default value which was/is yes
- unix extensions is now called smb1 unix extensions and has the same default value of yes
- With both wide links = yes and smb1 unix extensions = yes means that when there is a
  wide symlink (one that goes outside the share directory tree) then wide links is disabled
  because smb1 unix extensions is enabled. This is even though the smb1 protocol is disabled
  by default.
- This patch sets smb1 unix extensions = no in the configuration.
- This has been tested in my vm testbed and confirmed that the error message is no longer
   shown and that any wide links are able to be accessed from the share mounted on a client

Fixes: Bug#13193
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>
2023-08-07 09:21:52 +00:00
Stefan Schantl
569c9ac668 extrahd.cgi: Adjust copyright header
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:58 +00:00
Stefan Schantl
19a3b883de extrahd.cgi: Do not allow "/mnt" or "/media" as mount points
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
65dc35dcf4 extrahd.cgi: Requires "auto" as hidden FS type to mount a new device
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
480c5253d0 extrahd.cgi: Drop select for FS selection.
This feature does not have any benefit because the linux kernel
knows best which filesystem a device/partition has.

So there is no need for a user to specify this by-hand. This also
prevents from choosing a wrong fs type and as a direct result in a
not mountable device.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
72dfa1b097 extrahd.cgi: Add missing translation strings
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
7907c1e068 extrahd.cgi: Re-order sanity check logic
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
fd815c36ea extrahd.cgi: Display mount status next to the corresponding drive
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
0aa77c2fd5 extrahd.cgi: Add is_configured function.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
d0a6f9bdb2 extrahd.cgi: Store configured drives in a hash
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
94aeac8a05 extrahd.cgi: Abort if a device could not be umounted.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
56ce3e19e6 extrahd.cgi: Refactor code to use new introduced perl functions.
This also gets rid of allmost all unsafe system calls.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Stefan Schantl
a2c88aadef extrahd.cgi: Add various perl functions deal with block devices
This functions are going to replace the former used scan/write to file/read from
file approach by directly collecting the required informations from the
kernel sysfs and devfs.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-02 09:11:57 +00:00
Adolf Belka
f46e8298ad ovpnmain.cgi: Fixes bug#13190 - connection status shows disconnected for connected client
- If the certificate name has underscores in it then the status always shows as DISCONNECTED
   alothough the actual connection is working and can be used.
- The certificate with underscores works fine. RFC5280 accepts underscores in the name.
- The code for checking the status splits up the status message and takes the first part
   as the common name for the connection. Then there is a regex command which rerplaces
   any underscores in the status common name with spaces. This results in the connection
   with underscores in the certificate name never matching any status feedback common
   name as the underscores have been replaced by spaces.
- This has been tested to work with my vm test bed. With existing code the connection with
   underscores in the certificate name permanently showed DISCONNECTED. With the code change
   the connection shows as CONNECTED very quickly.

Fixes: Bug#13190
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>
2023-07-31 09:21:47 +00:00
Peter Müller
6a7a635ff4 Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-06-25 21:08:22 +00:00
Michael Tremer
80c04308de proxy: Skip VPNs that route everything for proxy.pac
The function tries to figure out which networks are connected locally,
but VPN tunnels that use 0.0.0.0 and GRE/VTI interfaces will be
considered local and the proxy is being disabled for everyone.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-06-25 13:52:41 +00:00
Jon Murphy
236e89ae87 extrahd.cgi: Fix for Bug #12863
-Fixes remove entries in 'extrahd' via the webinterface for extrahd.cgi file.

Suggested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2023-06-25 13:48:30 +00:00
Adolf Belka
30dc340714 ovpnmain.cgi: Fix Bug#13136 - Allow spaces when editing a static ip address pool name
- This was fixed for creating a static ip address pool name in bug#12865 but was not
   applied to the case when the static ip address pool name was being edited.
- This fix corrects that oversight.

Fixes: Bug#13136
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-06-22 21:28:03 +00:00
Adolf Belka
0746122a16 vpnmain.cgi: unique_subject = yes in index.txt.attr for first attempt with fresh install
- The patches for Bug#13138
   https://patchwork.ipfire.org/project/ipfire/patch/20230603140541.13834-1-adolf.belka@ipfire.org/
   https://patchwork.ipfire.org/project/ipfire/patch/20230606104050.8290-1-adolf.belka@ipfire.org/
   work for an update to Core Update 175 but a fresh install of CU175 will still fail with
   the error when creating the root/host certificate set for the first time.
- This patch ensures that the unique_subject = yes line is addeed to index.txt.attr
   when the root/host certificate set is attempted to be created or is uploaded also for
   the first attempt.

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>
2023-06-16 09:23:05 +00:00
Michael Tremer
0ebb271d1e ovpnmain.cgi: Fix return code of legacy check function
https://lists.ipfire.org/pipermail/development/2023-June/016042.html

Reported-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-06-12 13:55:37 +00:00
Adolf Belka
7dec360355 ovpnmain.cgi: Updated fix for Bug#13137
- This now only adds "providers legacy default" to the config files of connections that
   have legacy certificates, both for n2n and roadwarrior.
- This new approach also removes the requirement to have code in the update.sh script
   or in backup.pl so those earlier modifications are removed in two additional patches
   combined with this one in a set.
- The -legacy option has been removed from the pkcs12 creation part of the code as
   otherwise this creates a certificate in legacy format, which is not wanted. All new
   connection certificates being created will be based on openssl-3.x

Fixes: Bug#13137
Suggested-by: Michael Tremer <michael.tremer@ipfire.org>
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>
2023-06-09 12:43:45 +00:00
Adolf Belka
94aa82fa61 vpnmain.cgi: Fixes bug#13138 - root/host certificate set fails to be created
- The change to openssl-3.x results in the openssl commands that start with ca failing
   with the error message
     OpenSSL produced an error: <br>40E7B4719B730000:error:0700006C:configuration file
     routines:NCONF_get_string:no value:crypto/conf/conf_lib.c:315:group=<NULL>
     name=unique_subject
- The fix for this is to include the unique_subject = yes line into
   /var/ipfire/certs/index.txt.attr
- Additionally, based on the learnings from bug#13137 on OpenVPN, any openssl commands
   dealing with pkcs12 (.p12) files that were created with openssl-1.1.1x fail when being
   accessed with openssl-3.x due to the no longer supported algorithm. These can be
   accessed if the -legacy option is added to every openssl command dealing with pkcs12

Fixes: Bug#13138
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-06-05 14:51:33 +00:00
Adolf Belka
0b216134c2 ovpnmain.cgi: Fixes Bug#13137 - Existing n2n client connection created with openssl-1.1.1x fails to start with openssl-3.x
- With a n2n connection .p12 certificate created wityh openssl-1.1.1x the line
   providers legacy default is required in the n2nconf file to enable it to start.
- Any openssl-3.x attempt to open a .p12 file created with openssl-1.1.1x will result in
   a failure and an error message. All the openssl commands dealing with pkcs12 (.p12)
   files need to have the -legacy option added to them.

Fixes: Bug#13137
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-06-05 14:49:51 +00:00
Michael Tremer
d4c1274290 Revert "web-user-interface: Addition of new icon for secure connection certificate download"
This reverts commit 18bece0edb.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-05-26 14:27:08 +00:00
Michael Tremer
28b9c97651 Revert "ovpnmain.cgi: Fix for bug#11048 - insecure download icon shown for connections with a password"
This reverts commit 762c88ec4d.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-05-26 14:26:16 +00:00
Michael Tremer
2a0d7a03d7 clwarn.cgi: Remove XSS
Fixes: #12966
Fixes: CVE-2022-44392
Reported-by: Arthur Naullet <arthur.naullet@epita.fr>
Reported-by: Rafael Lima <isec-researcher@protonmail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-05-24 08:22:14 +00:00
Adolf Belka
c847846c4c ovpnmain.cgi: Fixes Bug#13117 - adds legacy option to openssl commands for cert & key extraction
- Any insecure connections made with openssl-3.x can have the cert and key extracted but
   if the insecure connection was made from prior to CU175 Testing then it used
   openssl-1.1.1 which causes an error under openssl-3.x due to the old version being able
   to accept older ciphers no longer accepted by openssl-3.x
- Adding the -legacy option to the openssl commands enables openssl-3.x to successfully
   open them and extract the cert and key
- Successfully tested on a vm system. Confirmed that the downloaded version under
   openssl-3.x worked exactly the same as the version downloaded under openssl-1.1.1

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-05-22 22:08:11 +00:00
Adolf Belka
18bece0edb web-user-interface: Addition of new icon for secure connection certificate download
- This uses a padlock icon from https://commons.wikimedia.org/wiki/File:Encrypted.png
- The license for this image is the following:-
   This library is free software; you can redistribute it and/or modify it under the terms
   of the GNU Lesser General Public License as published by the Free Software Foundation;
   either version 2.1 of the License, or (at your option) any later version. This library
   is distributed in the hope that it will be useful, but without any warranty; without
   even the implied warranty of merchantability or fitness for a particular purpose. See
   version 2.1 and version 3 of the GNU Lesser General Public License for more details.
- Based on the above license I believe it can be used by IPFire covered by the GNU General
   Public License that is used for it.
- The icon image was made by taking the existing openvpn.png file and superimposing the
   padlock icon on top of it at a 12x12 pixel format and naming it openvpn_encrypted.png

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-05-18 09:51:09 +00:00
Adolf Belka
762c88ec4d ovpnmain.cgi: Fix for bug#11048 - insecure download icon shown for connections with a password
- The insecure package download icon is shown if entry 41 in /var/ipfire/ovpn/ovpnconfig
   is set to no-pass. The code block on ovpnmain.cgi that deals with this checks if the
   connection is a host and if the first password entry is a null. Then it adds no-pass
   to ovpnconfig.
- The same block of code is also used for when he connection is edited. However at this
   stage the password entry is back to null because the password value is only kept until
   the connection has been saved. Therefore doing an edit results in the password value
   being taken as null even for connections with a password.
- This fix enters no-pass if the connection type is host and the password is null, pass if
   the connection type is host and the password has characters. If the connection type is
   net then no-pass is used as net2net connections dop not have encrypted certificates.
- The code has been changed to show a different icon for unencrypted and encrypted
   certificates.
- Separate patches are provided for the language file change, the provision of a new icon
   and the code for the update.sh script for the Core Update to update all existing
   connections, if any exist, to have either pass or no-pass in index 41.
- This patch set was a joint collaboration between Erik Kapfer and Adolf Belka
- Patch set, including the code for the Core Update 175 update.sh script has been tested
   on a vm testbed

Fixes: Bug#11048
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Tested-by: Erik Kapfer <ummeegge@ipfire.org>
Suggested-by: Adolf Belka <adolf.belka@ipfire.org>
Suggested-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-05-18 09:51:09 +00:00
Adolf Belka
5a6134e2a6 wio: move cgi files to standard IPFire location
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-05-18 09:47:46 +00:00
Adolf Belka
4e908f84c7 wio: images moved to standard IPFire location
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-05-18 09:47:46 +00:00
Peter Müller
15d8e278ba Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-05-11 20:34:43 +00:00
Stefan Schantl
c797789c1f backup.cgi: Read and deliver the requested backup in pieces
Read-in the requested backup file line by line and directly deliver this
as stream to the client.

This fixes the problem with very big backups on systems with very
limited RAM, which resulted in an OOM kill of the CGI and delivery
process.

Fixes #13096.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-05-11 20:07:13 +00:00
Robin Roevens
957b6f92b9 Add Zabbix Agent to logviewer
- Configure Zabbix Agent to log to syslog instead of its own logs.
- Remove old zabbix log-dir and logrotate settings from rootfile, lfs
  and install-script.
- Update log.dat to view Zabbix Agent logging from syslog.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2023-05-11 20:03:27 +00:00
Peter Müller
a201764e75 ovpnmain.cgi: Do not determine certificate expiry status for N2N connections
https://wiki.ipfire.org/devel/telco/2023-04-03

Fixes: #13066
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-04-04 20:25:55 +00:00
Leo-Andres Hofmann
138b26e014 Drop support for entropy graph
Entropy data isn't collected anymore. See 8000bc0 for reference.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-03-13 21:37:39 +00:00
Peter Müller
8014198eb6 Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-03-11 17:06:16 +00:00
Adolf Belka
71604352ca procy.cgi: Fix bug#12701 - remove advproxy wpad notice line
- This line is no longer needed with the help button at the top of each WUI page that was
   implemented by @Leo
- Sorry for long time for me to get around to finalising this patch but it is done now.

Fixes: bug#12701
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:31:57 +00:00
Adolf Belka
14051bfeb5 updatexlrator.cgi: Update to naming of variables in css section
- This updates the updatexlrator.cgi page to the same central use of extraHead from
   header.pl and simplifying of css variables where appropriate.
- The variables for the percentage bar will also be able to be used in other cgi pages
   with a percent bar.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:30:39 +00:00
Adolf Belka
d3aec71828 dhcp.cgi: Update to naming of variables in css section
- After looking at other .cgi files I realised that I had named the variables based on
   their dhcp usage only. However colouryellow or color20 etc can be used not only in a
   row but also in a cell or a column. Rather than ending up with multiple copies of the
   same colour for rows, cells, columns etc I have simplified the variable names to just
   the colour. They can then be used in whatever situation is wanted. The rest of the cgi
   code will give the view of what structure the colour is being applied to.
- This will limit the number of different css variables defined in the header.pl file

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:30:39 +00:00
Stefan Schantl
44ea49fa75 traffic.cgi: Do not use hard-coded red interface name
If QMI is used the dial in mode has to be set as ppp dialin but the
interface name is red. In such a case the old code tried to display
the stats for the ppp0 interface which is wrong.

This patch fixes this issue by calling the handy function to get
the correct interface name for red.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2023-03-11 16:29:43 +00:00
Stefan Schantl
0450dce6f6 ipblocklist.cgi: Fix settings checkbox handling
Checkboxes does not submit any values if they are not checked.
Default them to "off" in such a case.

This fixes the issue not beeing able to disable the logging.

Fixes #12979.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:27:32 +00:00