Commit Graph

2900 Commits

Author SHA1 Message Date
Michael Tremer
9dd2a4635f IPS: Fix how we show EOL providers
There is no need to add a legend as I find it confusing. The change that
people are using an EOL is rather slim and so I don't to waste space.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-26 15:23:08 +00:00
Stefan Schantl
ad0d064a48 ids.cgi: Improve add provider logic
Do not longer add unsupported/removed providers as an option
when adding a new/first ruleset provider.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-22 15:30:22 +00:00
Stefan Schantl
cf6eaba833 ids.cgi: Adjust code for marking unsupported providers
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-22 15:18:41 +00:00
Stefan Schantl
df7977fde7 ids.cgi: Change check if a provider is not longer supported
This check is now based on a download URL instead of checking if
an entry in the ruleset sources is present.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-22 15:18:41 +00:00
Michael Tremer
bd8cc16ffd make.sh: Update contributors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-18 16:17:53 +00:00
Jon Murphy
f561899b54 time.cgi: add current date-time to this WebGUI page
- added words and date-time format to english (en.pl)
- other languages are needed
- seconds included since time is accurate to < .1s
https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=2234e8aacac2e0d0b06dac4513585c15c2b3b440

Code-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-14 18:45:17 +00:00
Michael Tremer
ee9b73657e dns.cgi: Remove excess whitespace
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-14 09:26:19 +00:00
Adolf Belka
cd7a901109 dns.cgi: Add use Encode + encode back to UTF-8
- use Encode was missed out in the previous patch for dns.cgi This would mean that the
   decode from UTF-8 would fail. I had tested the previous change but forgot to copy across
   the use Encode line when I created the patch.
- This patch adds an encode back to UTF-8 after running the cleanhtml command. This way
   the text is decoded from UTF-8 so that the cleanhtml command works correctly on
   umlauted characters and then is encoded back to UTF-8 so that all text in the cgi page
   is UTF-8.

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>
2024-03-14 09:24:33 +00:00
Adolf Belka
716b8fb503 dns.cgi: Fixes bug#12395 - German umlauts not correctly displayed in remarks
- If Freifunk München e.V. is entered as a remark it gets converted to
   Freifunk München e.V.
- This is because cleanhtml is used on the UTF-8 remark text before saving it to the file
   and the HTML::Entities::encode_entities command that is run on that remark text does
   not work with UTF-8 text.
- If the UTF-8 text in the remark is decoded before running through the cleanhtml command
   then the characters with diacritical marks are correctly shown.
- Have tested out the fix on a remark with a range of different characters with
   diacritical marks and all of the ones tested were displayed correctly with the fix while
   in the original form they were mangled.

Fixes: Bug#12395
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>
2024-03-12 09:30:50 +00:00
Adolf Belka
5a7342fc28 dns.cgi: Revert "dns.cgi: Fixes bug#12395 - German umlauts not correctly displayed in remarks"
- This reverts commit 7c6ff5ff12
- That commit removed the cleanhtml command which is not advised, based on feedback from
   Michael Tremer from other patch submissions as it creates a potential security problem.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-12 09:30:50 +00:00
Adolf Belka
4a0648243b ovpnmain.cgi: Fixes bug#13548 - imported N2N client connections get disabled instead of no-pass
- When bug#11408 was fixed it was missed that key 41 has disabled inserted into it when
   uploading into the N2N client. This replaced the no-pass entry for all N2N connections
   resulting in the ovpnmain.cgi not being able to show the status correctly as the code
   looks for pass or no-pass.
- The disabled entry has been present for a very long time and is not utilised anywhere
   in the code.
- This fix ensures that key 41 in the uploaded N2N connection has no-pass entered
- Tested out and confirmed in my vm testbed.

Fixes: Bug#13548
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>
2024-03-03 10:08:29 +00:00
Arne Fitzenreiter
d71c37a632 index.cgi exclude efivarfs from disk free check
on some systems this filesystem is always reported as full so
this is now excluded.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-03-03 09:03:22 +01:00
Adolf Belka
f433fdcd90 ovpnmain.cgi: Fixes bug#13404 - prevents certs being saved if common name is already used
- This was fixed by moving the code for checking if the common name is already used, to
   the same location as the code for checking if the connection name is already used.
- Tested out on vm testbed and confirmed that the certificates are not created and the
   index.txt not updated if the common name is flagged as already being used. If the
   entry is changed to use a new CN and Save pressed then the certs are saved and the
   index.txt updated. If Cancel is pressed then no certs are saved and index.txt is not
   updated.

Fixes: Bug#13404
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>
2024-02-28 16:40:53 +00:00
Adolf Belka
60a050768f dhcp.cgi: Fixes bug#11774 - allows dhcp option of array of integer 8
- This v2 version is to correct the bug number. I entered a wronn bug number in the first
   version
- This extends the allowed options from just array of ip-address to also include
   integer 8 or integer 16 or integer 32.
- Tested out on vm testbed. The array of integer 8 (or 16 or 32) is acceptewd by the dhcp
   options section. I am not able to test out that the function actually works as I don't
   have any dhcp situation set up to use that capability.
- Records or array of records is still not included. It was only an expansion of the array
   of section to include integers.

Fixes: bug#11774
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>
2024-02-28 16:29:27 +00:00
Adolf Belka
7c6ff5ff12 dns.cgi: Fixes bug#12395 - German umlauts not correctly displayed in remarks
- If Freifunk München e.V. is entered as a remark it gets converted to
   Freifunk München e.V.
- This is because cleanhtml is used on the remark text before saving it to the file  and
   the HTML::Entities::encode_entities command that is run on that remark text encodes all
   higher bit characters as unsafe characters and replaces them with their HTML entity
   representation.
- Have tested out the remark with a range of different characters with diacritical marks
   and all of the ones tested were re-written.
- The use of the cleanhtml makes sense when used on URL's or on text that is going to be
   printed as part of the HTML code for a page but it doesn't seem to make sense for text
   used in a remark.
- The cleanhtml function is only used on the remark text in dns.cgi and not on any other
   entries on the page.
- Removing the call to the cleanhtml function results in the German umlauts being printed
   in the remark section.
- Many of the WUI pages have the cleanhtml function used on remark or comment text.
- fwhosts.cgi does not use cleanhtml anywhere. So all its remark sections work with
   characters with diacritical marks.
- If this patch is accepted, I will then submit patches for the other WUI pages where
   characters with diacritical marks are re-written in remark or comment sections.

Fixes: Bug#12395
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>
2024-02-28 16:10:28 +00:00
Arne Fitzenreiter
3de42257d0 mpd: move scripts and config from mpfire to mpd
this allows to use mpd without mpfire installed.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-02-24 16:39:59 +01:00
Arne Fitzenreiter
a4f29a5347 transmission: add menuentry to transmission webgui
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-02-11 13:33:39 +01:00
Arne Fitzenreiter
761e73230f mympd: update to 14.0.1
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-02-11 11:27:48 +01:00
Arne Fitzenreiter
394405b1dd vdr: add menu entry for vdr website
we had discussed this on december telco but it is not so
easy because our menusystem only shows entry's existing cgi's.
so i add a cgi redirect to http://$ENV{SERVER_ADDR}:3000
this add the entry under pakfire and also to service page.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-10 12:00:18 +00:00
Michael Tremer
9f01011570 vpnmain.cgi: Add option to regenerate the host certificate
This is necessary since we now have a much shorter lifetime for the host
certificate. However, it is complicated to do this is which is why we
are copying the previous certificate and generate a new CSR. This is
then signed.

A caveat of this patch is that we do not rollover the key.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:08:51 +00:00
Michael Tremer
aa07e1bb3e vpnmain.cgi: Return the entire error message if OpenSSL fails
The function did not evaluate the return code which is why it used a
hack to figure out if some output is an error or not.

This is being fixed in this commit and the entire output is being
returned if the return code is non-zero.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:07:53 +00:00
Michael Tremer
182743310c vpnmain.cgi: Do not use a bad source for randomness
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:07:53 +00:00
Adolf Belka
b4f6962c4d optionsfw.cgi: Move Firewall Options Drop commands to before the logging section
- Moved the Firewall Options Drop commands to before the logging section, as discussed
   at January 2024 Video Call.

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>
2024-02-07 11:02:18 +00:00
Adolf Belka
89645d1bbf optionsfw.cgi: Fix bug12981 - Add option to log or not log dropped hostile traffic
- This v3 version has split the logging choice for drop hostile to separate the logging of
   incoming drop hostile and outgoing drop hostile.
- The bug originator had no port forwards so all hostile would be dropped normally anyway.
   However the logs were being swamped by the logging of drop hostile making analysis
   difficult. So incoming drop hostile was desired to not be logged. However logging of
   outgoing drop hostile was desired to identify if clients on the internal lan were
   infected with malware trying to reach home.
- Added option with drop hostile section to decide if the dropped traffic should be
   logged or not.

Fixes: bug12981
Tested-by: Adolf Belka <adolf.belka@ipfire.org
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:02:17 +00:00
Michael Tremer
fc4b02df53 vpnmain.cgi: Fix parsing CN from certificates generated by OpenSSL 3.2
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-30 17:42:37 +00:00
Michael Tremer
9d30f138f9 index.cgi: Remove some custom CSS styling that broke the design
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-10 12:25:33 +00:00
Michael Tremer
a1bb2fb585 Revert "proxy.cgi: Fix for Bug #12826 'squid >=5 crashes on literal IPv6 addresses'"
This reverts commit e0be9eab47.

This change is now producing problems on IPv6-enabled systems as it will
deny access to any website that is IPv6-enabled as well, even if the
client connected using IPv4.

I have tested if squid is now running on fine on systems where IPv6 is
disabled and can confirm that its running just fine.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2024-01-08 18:34:58 +00:00
Adolf Belka
f16eeae078 dhcp.cgi: Adjust legend entries to make clear they are legends and not messages
- A new IPFire user on the forum saw the orange and red coloured blocks in the legend
   section and believed that they were messages about problems that had been created with
   the fixed leases.
- This change puts a small block with seperate explanatory text for both the orange and
   red coloured blocks.
- This change will also be applied to the wiki in a much clearer way

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2024-01-03 21:02:19 +00:00
Adolf Belka
dcb878d6a1 dhcp.cgi: Adjust spacing between an icon and explanatory text
- When dealing with a problem on the forum I noticed that in the Fixed Leases table
   Legend section there was a very large space between the empty checkbox icon and the
   explanatory text. It looks like the &nbsp that I have removed worked on the text
   section 'click to enable' as that was moved but not on the off.gif icon as that stayed
   in its original place leaving a very large space between the icon and the explanatory
   text. Removing the two &nbsp; commands fixes that.
- Reading up about &nbsp the problem might be related to these tags no longer being
   recommended to use with the newer HTML versions and that indenting or spacing should be
   done via CSS code. Will have a look in future on how to accomplish this via CSS.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2024-01-03 21:02:19 +00:00
Peter Müller
ac225ec698 firewalllog.dat: Update copyright header
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-12-30 07:05:49 +00:00
Adolf Belka
f02adfbc74 firewalllog.dat: Fix for bug#13492 - include chain in the exported output
- The regex code does not extract out the chain and so it is missed off from the log output
   when it is exported.
- Changed code tested out on my vm testbed and confirmed to work and include the chain in
   the output.

Fixes: Bug13492
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfre.org>
2023-12-30 07:04:02 +00:00
Arne Fitzenreiter
7270984c46 update-contributors
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2023-12-22 10:30:45 +00:00
Sebastien GISLAIN
0a60842a28 index.cgi: correct gpl-accepted in gpl_accepted
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2023-12-22 10:19:44 +00:00
Erik Kapfer
a913e1ebdd tor.cgi: Fixes deprecated tor option 'ExitNode' to 'ExitNodes'
If fingerprints in the Exit Node section are in usage, tor.cgi prints the
deprecated option 'ExitNode' into torrc which leads to the following warning
"The abbreviation ‘ExitNode’ is deprecated. Please use ‘ExitNodes’ instead".
Fix has been found and tested in the community for reference please see -->
https://community.ipfire.org/t/the-abbreviation-exitnode-is-deprecated-please-use-exitnodes-instead/10582/10

Signed-off-by: Erik Kapfer <erik.kapfer@ipfire.org>
2023-12-04 22:32:43 +00:00
Peter Müller
ff12bfdae1 Revert "Run ./make.sh update-contributors"
This reverts commit a778e396bd.
2023-11-24 13:39:45 +00:00
Peter Müller
70d8e3be30 Revert "dhcp.cgi: Add column with resolved hostname by IP address"
This reverts commit ee556e820f.

See https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/message/QNCXBVG7CNENG4YTSRXXDQCB52E7FEW7/
2023-11-24 13:37:24 +00:00
Peter Müller
a778e396bd Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-11-24 13:24:04 +00:00
Peter Müller
74eb1c9539 dhcp.cgi: Update file header
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-11-24 13:22:42 +00:00
Sebastien GISLAIN
ee556e820f dhcp.cgi: Add column with resolved hostname by IP address
In web interface, on page DHCP Server, in table Current fixed leases, add column with resolved hostname by IP address
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2023-11-24 13:22:03 +00:00
Peter Müller
e7e1a3514e connections.cgi: Update file header
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-11-24 13:13:16 +00:00
Adolf Belka
58543d54c6 connections.cgi: Fix Expires time Heading in Connections cgi page
- The Expires time heading for the Connections WUI page has seconds listed. However the
   code is converting the seconds to hours:minutes:seconds.
- This patch is changing the heading to H:M:S in English and the equivalent in the other
   languages. I have basewd this on the initial letter for Hours, Minutes & Seconds in
   each of the languages.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2023-11-24 13:12:19 +00:00
Stefan Schantl
15d9c996f9 extrahd.cgi: Add support for LVM and MDADM devices
This commit adds support for using LVM and mdadm based RAID devices
for the CGI page.

In case one or more drives/partitions are used by such a "grouped"
volume they still will displayed on the page, but can not be
configured/used. Instead the "master" volume of which the
drive/partition is part of is shown in the "mountpoint" input box.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-10-01 08:16:17 +00:00
Adolf Belka
cb741b5a66 urlfilter.cgi: Fixes bug#10649 - calls urlfilterctrl with remove option if update disabled
- When the url filter update enable checkbox is unchecked then this patch calls
   urlfilterctrl with the remove option added in the otrher patch of this series.
- Tested on my vm testbed that this change does remove the urlfilter symlink from the
   fcron directories when the update is disabled.

Fixes: Bug#10649
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-09-28 09:39:26 +00:00
Adolf Belka
8c5e71db2a ovpnmain.cgi: Fix for bug#11048 - insecure download icon shown for connections with a password
- At long last I have re-visited the patch submission for bug #11048 and fixed the issues
   that caused the problems last time I evaluated it in Testing.
- 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 180 update.sh script has been tested
   on a vm testbed

Fixes: Bug#11048
Tested-by: Adolf Belka <adolf.belka@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>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-09-28 09:33:21 +00:00
Peter Müller
13b04e6998 Tor: Do not attempt to establish connections via IPv6
To quote from the changelog of Tor 0.4.8.4:

  o Minor feature (client, IPv6):
    - Make client able to pick IPv6 relays by default now meaning
      ClientUseIPv6 option now defaults to 1. Closes ticket 40785.

In order to avoid any malfunctions on IPFire installations,
set this option to "0" explicitly.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-09-15 06:56:21 +00:00
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