Commit Graph

2872 Commits

Author SHA1 Message Date
Peter Müller
4794ebdedd Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-10 08:34:45 +00:00
Stefan Schantl
2493c9eabb ipblocklist.cgi: Display reload request as notice instead of error.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:28:06 +02:00
Stefan Schantl
77af89e59f ipblocklist.cgi: Use changed fw reload language string.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:28:05 +02:00
Stefan Schantl
6223e2b498 showrequestfromblocklist.dat: Fix silly typos.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Rob Brewer
3e0cb28fc6 showrequestfromblocklist.dat: Modify regex for added space in
log-prefix.

Signed-off-by: Rob Brewer <rob.brewer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Rob Brewer
98d50c03e7 ipblocklist.dat: Do not rely on any theme settings.
The support for themes has been removed since ages, so we
do not need this anymore and may crash the page.

Signed-off-by: Rob Brewer <rob.brewer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Stefan Schantl
3b114903aa ipblocklist.cgi: Mark and display a notice about a required reload of
the firewall.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Stefan Schantl
a72c2458c4 ipblocklist.cgi: Add better messages in error case.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Tim FitzGeorge
c0472dcf2a logs.cgi/log.dat: Allow to show logged ipblocklist messages.
Signed-off-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Rob Brewer
d6b0613744 ipblocklists.dat: Remove uneccessary and broken module includes.
Signed-off-by: Rob Brewer <rob.brewer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Tim FitzGeorge
cd07e6c659 ipblacklist: WUI Log details page
Signed-off-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Tim FitzGeorge
09a8d6127a ipblocklist: WUI Log page
Signed-off-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Stefan Schantl
8f49b75b08 ipblocklist.cgi: Adjust CGI to work with backend from ipblocklist-functions.pl
* Slightly adjust code indention.
* Remove Java Script code for show/hiding.
* Remove unnedded functions.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Tim FitzGeorge
5d24215341 ipblocklist: WUI Settings page
Signed-off-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
2022-07-07 17:26:13 +02:00
Peter Müller
20d4c7293a Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-06 12:37:29 +00:00
Michael Tremer
6395bed8a4 aliases: Add support to assign aliases to multiple RED interfaces
This is a little patch which will extend the aliases page to offer an
interface selection if there are more than one RED interfaces.

This is a little hack to make configuration easier for users who have
manually set up more than one RED interface (e.g. for load balancing or
fail-over) and want to use the UI to configure firewall rules.

As a little benefit on the side, I had to rewrite setaliases.c to use
ip(8) instead of ifconfig(8).

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-06 10:01:50 +00:00
Peter Müller
8000bc0a43 Core Update 169: Drop entropy.cgi
Since the kernel now always reports 256 bits of entropy to be available,
this CGI does not show any useful information anymore. To avoid
confusions, it will hereby be removed entirely.

Fixes: #12893
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-29 20:28:38 +00:00
Adolf Belka
dcc2f7e0f2 ovpnmain.cgi: Fix for bug #12865 - Static IP address pools - Add network - Name with space
- The fix for bug #12428 removed spaces from the validhostname subroutine as hostnames are
   not supposed to have spaces
- This resulted in spaces no longer being allowed for the Static IP Address Pools names
- New subroutine created called validccdname in general-functions.pl

Fixes: Bug #12865
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2022-06-25 09:14:22 +00:00
Adolf Belka
f158e71e20 ovpnmain.cgi: Fix for bug #12883 - separate .p12 file corrupted
- Patch https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=2feacd989823aa1dbd5844c315a9abfd49060487
   from May 2021 put the variable containing the .p12 content into double quotes which
   causes the contents to be treated as text whereas the .p12 file is an application file.
- Most people must be downloading the zip package of .p12, ovpn.conf and ta.key files so
   the problem was not noticed till now and flagged up in the forum.
   https://community.ipfire.org/t/openvpn-p12-password-on-android-problem/8127
- The problem does not occur for the .p12 file in the zip file as the downloading of the
   zip file does not have the variable name in double quotes.
- Putting the zip file variable into double quotes caused the downloaded zip file to be
   corrupt and not able to be opened as an archive.
- Removing the double quotes from the .p12 variable name caused the separate .p12 file
   download to be able to be correctly opened.
- The same quoted variable name is used also for the cacert.pem, cert.pem, servercert.pem
   and ta.key file downloads. To be consistent the same change has been applied to these.

Fixes: Bug #2883
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>
2022-06-23 13:24:03 +00:00
Peter Müller
34798dcd50 vulnerabilities.cgi: Add MMIO Stale Data
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-22 18:11:11 +00:00
Peter Müller
39c9a69406 Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-17 16:49:57 +00:00
Timo Eissler
3740b7ad3a ovpnmain.cgi: URI encode OTPAuth String in QRCode
Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:22:31 +00:00
Timo Eissler
209d62f005 ovpnmain.cgi: Remove trailing newline from OTP secret
Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:22:31 +00:00
Timo Eissler
10b32d3895 ovpnmain.cgi: Fix OTP secret handling
Convert stored hex OTP secret to binary prior to converting to base32.
2022-06-17 10:20:19 +00:00
Timo Eissler
16d4a5c264 ovpnmain.cgi: Fix comparison operators 2022-06-17 10:20:18 +00:00
Michael Tremer
a999886759 openvpn-2fa: Configure fake authentication credentials
These configuration option are required to make the client authenticate
itself against the server.

The server may then accept those credentials without any further ado or
ask for a OTP.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
5111dc3df3 openvpn-2fa: Enable management socket for RW server
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
6834749d22 openvpn-2fa: Drop the previous authentication handler
This has been replaced by the newer authenticator

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
c63a54f090 ovpnmain.cgi: Load all modules at the beginning
Although Perl modules tend to take a long time to load, it is better to
do this at the beginning so that loading the script will show any
errors.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
2050be20e1 ovpnmain.cgi: Disable sending any error messages to the browser again
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Timo Eissler
e1e10515ec OpenVPN: Add support for 2FA / One-Time Password
Add two-factor authentication (2FA) to OpenVPN host connections with
one-time passwords.

The 2FA can be enabled or disabled per host connection and requires the
client to download it's configuration again after 2FA has beend enabled
for it.
Additionally the client needs to configure an TOTP application, like
"Google Authenticator" which then provides the second factor.
To faciliate this every connection with enabled 2FA
gets an "show qrcode" button after the "show file" button in the
host connection list to show the 2FA secret and an 2FA configuration QRCode.

When 2FA is enabled, the client needs to provide the second factor plus
the private key password (if set) to successfully authorize.

This only supports time based one-time passwords, TOTP with 30s
window and 6 digits, for now but we may update this in the future.

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Jon Murphy
574f453853 ovpnmain.cgi: correct spelling
- change "coment" to "comment"

Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-11 14:34:31 +00:00
Leo-Andres Hofmann
64db1faf67 manualpages: Add path and file extension to the configuration
This allows to correctly assign an URL to a file without relying
on unique base names.
A custom read function is required because General::readhash()
doesn't allow paths as hash keys. Modifying the existing functions
could affect other CGIs and was therefore dismissed.

Fixes: #12806

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-06-04 09:23:42 +00:00
Peter Müller
4f4b7fbc13 Update contributor list
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-05-30 20:00:53 +00:00
Leo-Andres Hofmann
2b5253bbbb pakfire.cgi: Cosmetic fixes
Add formatting to improve readability of dependencies list header.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:21 +00:00
Leo-Andres Hofmann
3706e0a5b3 pakfire.cgi: Discard tac stderr output
Prevents meaningless "broken pipe" messages in the httpd error log.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:21 +00:00
Leo-Andres Hofmann
85d570843e pakfire.cgi: Implement Post/Redirect/Get pattern
Refreshing the Pakfire page may cause a command to be
executed multiple times and induce odd errors.

This patch implements a HTTP 303 redirect after form processing,
which causes the browser to discard the POST form data.
Navigating backward or reloading the page now does not trigger
multiple executions anymore.

Fixes: #12781

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:21 +00:00
Leo-Andres Hofmann
3cdb83939b pakfire.cgi: Notify user if Pakfire is already performing a task
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:21 +00:00
Leo-Andres Hofmann
4b5d1f3001 pakfire.cgi: Show error and log messages earlier
The main page cannot be used while an installation is running.
Therefore it makes more sense to generate the log output first.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:20 +00:00
Leo-Andres Hofmann
0f506a130c pakfire.cgi: Fix indentation
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:20 +00:00
Leo-Andres Hofmann
cd521e78b8 pakfire.cgi: Separate command processing and HTML generation
Move most of the command execution away from the HTML output.
This makes it easier to modify or extend individual commands.

Also load Pakfire settings earlier to ensure that they are
available during command execution.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:20 +00:00
Peter Müller
b6fe8ee88d Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-05-05 16:24:20 +00:00
Peter Müller
4d4f5df0c8 Merge branch 'temp-stevee-idsv4' into next 2022-05-05 16:07:41 +00:00
Stefan Schantl
1a9e81ce7f ids.cgi: Remove etag data when deleting a provider.
Otherwise the same provider could not be added again at a later
time if the stored etag is still valid.

In this case the server will not offer the rules and the provider
could not be added.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-26 05:24:47 +02:00
Peter Müller
aa2ab8c40b Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-24 19:14:49 +00:00
Leo-Andres Hofmann
154dfcb7a2 wakeonlan.cgi: Fix meta refresh tag
This fixes an HTML error that is briefly visible
on the "magic packet sent" page.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-24 19:13:51 +00:00
Matthias Fischer
52f8118635 media.cgi: Added translation for 'inodes'
For details see:
https://en.wikipedia.org/wiki/Inode

or

http://www.linfo.org/inode.html ;-)

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
2022-04-24 19:08:34 +00:00
Leo-Andres Hofmann
cdf0522ec2 HTML: Add language attribute
This attribute is recommended by W3C, because it is used by
screen readers to provide the correct pronunciation.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-24 14:21:49 +00:00
Peter Müller
bad8659d80 Do not mark CGI files as executable, second round
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-23 19:36:57 +00:00
Peter Müller
c04309ef01 Do not mark CGI files as executable
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-23 19:35:37 +00:00