Commit Graph

583 Commits

Author SHA1 Message Date
Michael Tremer
9207afd883 core188: Ship lang.pl
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-21 16:17:22 +02:00
Michael Tremer
17ef83f223 header.pl: Fix language loading
We have been importing the language files many times when they are
actually rather slow. This just tidies this up.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-21 16:02:42 +02:00
Michael Tremer
ba8a6d83bd header.pl: Remove an unused variable
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-21 16:02:13 +02:00
Michael Tremer
a561a1d866 lang.pl: Fix all sorts of whitespace issues
No functional changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-21 16:01:40 +02:00
Michael Tremer
cc0304b7bd index.cgi: Improve the warning box
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-21 15:47:08 +02:00
Michael Tremer
1674ec7205 suricata: Disable logging of App Layer events by default
This might only be useful for debugging (and even that is questionable).
So instead of flooding logs, we disable this, but it can be easily
enabled for development again.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-16 13:17:59 +00:00
Michael Tremer
9f3c37ab0c ovpnmain.cgi: Unify the error message box
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-14 16:53:54 +00:00
Michael Tremer
d33000e991 header.pl: Define a colour for WireGuard
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-07 14:26:20 +02:00
Michael Tremer
86ca826ff1 header.pl: Bump the CSS version so that browsers reload the file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-06 17:45:58 +02:00
Michael Tremer
aca5f661c2 services.cgi: Drop the process graphs
These are utterly broken and incomplete. I don't want to fix this now,
so I am dropping it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-06 17:14:41 +02:00
Michael Tremer
0b16963484 web: Create a function to show the service status
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-06 17:08:40 +02:00
Michael Tremer
0869a6f5f3 graphs: Highlight the default range before the user clicks anything
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-06 16:51:06 +02:00
Michael Tremer
76f429d5d8 licenses: Remove the braindead GPL acception stage
The GPL is not an EULA and so there is no value in having users
accept it.

The UI is very broken and so I believe it is best to drop this entirely.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-08-06 16:48:27 +02:00
Michael Tremer
10210334fe Merge remote-tracking branch 'ms/cleanup' into next 2024-07-24 16:32:28 +00:00
Adolf Belka
eef090c3de header.pl: Add utf-8 handling into cleanhtml command
- existing cleanhtml command does not handle diacritical charcters such as umlauts, acute,
   grave and circumflex accents.
- In bug 12395 the problem was resolved by adding decode before and encode after the
   cleanhtml command in dns.cgi
- Suggestion from @Michael Tremer was to add the decode and encode sections into the
   actual cleanhtml subroutine in header.pl
- This patch submission is the execution of that suggestion.
- This will ensure that whenever cleanhtml is used for any remark in a WUI page it will
   handle diacritical charcters.
- Tested out on my vm testbed system and confirmed to be working when cleanhtml has the
   encode and decode lines.
- Combined with this patch is another one that changes the dns.cgi to remove the decode
   and encode entries added into the cgi code.

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>
2024-07-02 09:13:10 +00:00
Michael Tremer
6515a27802 header.pl: Fix parsing BOOTP leases
If the lease has been handed out over BOOTP, it will never expire.
However, the parser did not account for this case at all which is fixed
in this patch.

Fixes: #13689 - BOOTP breaks the list of DHCP leases due to erroneous parsing
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2024-05-19 15:11:34 +02:00
Michael Tremer
98b755225e general-function.pl: Add a function to easily set defaults
This function can be used to set values in a hash if they have not been
set, yet.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:44:29 +02:00
Michael Tremer
3cd821c122 web: Refactor graphs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:43:33 +02:00
Michael Tremer
2dd6bc7225 web: Introduce sections
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:43:07 +02:00
Michael Tremer
f5bddd4fe7 header.pl: Simplify boxes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:41:33 +02:00
Michael Tremer
d716ad52a7 header.pl: Remove unused openpagewithoutmenu function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:41:16 +02:00
Michael Tremer
66db90757a Remove RECONNECTION=dialondemand
We don't support this at all and so we don't need to check any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:35:47 +02:00
Michael Tremer
cc5613b3b5 network-functions.pl: Read PPP settings globally
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:35:36 +02:00
Michael Tremer
789251ae65 web: Read ethernet settings file only once in headers
The web UI is rather slow and one of the reasons for that is that we are
reading the same files over and over again...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:35:24 +02:00
Michael Tremer
07257e1f83 general-functions.pl: Don't use line buffering
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:35:08 +02:00
Michael Tremer
0e750575a9 web-user-interface: Move theme functions back into header.pl
Since we no longer support other themes, the web UI should load quicker
if not importing too many other files.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:34:59 +02:00
Michael Tremer
9b044bc8eb header.pl: Remove unused function "is_modem"
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:34:36 +02:00
Michael Tremer
0e93c1eaf3 header.pl: Fix whitespace errors
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:34:27 +02:00
Michael Tremer
62a84fdb4a general-functions.pl: Remove unused NextIP* functions
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:34:14 +02:00
Michael Tremer
9c9f637e16 general-functions.pl: Remove unused srtarray function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:34:04 +02:00
Michael Tremer
11e75894ce general-functions.pl: Remove getlastip/getnextip
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:33:55 +02:00
Michael Tremer
498feaa550 general-functions.pl: Drop unused getccdbc function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:33:40 +02:00
Michael Tremer
b8d1ae216f general-functions.pl: Drop unused "writehashpart" function
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:33:31 +02:00
Michael Tremer
d110e751f3 general-functions.pl: Fix various whitespace issues
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:33:21 +02:00
Michael Tremer
737e9e1037 network-functions.pl: Add function to get netmask in dotted format
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:30:44 +02:00
Michael Tremer
85e004c2da network-functions.pl: Fix return code check
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:30:32 +02:00
Michael Tremer
65fff7fc34 network-functions.pl: Fix whitespace issues
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:30:21 +02:00
Michael Tremer
0e55d27737 network-functions.pl: Add function to extract prefix
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:30:09 +02:00
Michael Tremer
82fec28abe header.pl: Allow passing more HTTP headers to showhttpheaders()
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-27 19:28:25 +02:00
Stefan Schantl
ee16b227a5 ids-functions.pl: Use libarchive to extract archives
This gives us a lot of benefits:

* Speed up the extraction process
* More supported archive types due the power of libarchive
* Support of passphrase protected archives

It also fixes a problem with non extracted files next to a zero sized
file inside an archive.

Fixes #13632.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-03-30 12:09:14 +00:00
Stefan Schantl
738ee72027 ids-functions.pl: Improve logic to get the cached rulesfile of a provider
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
Jon Murphy
9297dba50f manualpages: update wiki url
Suggested-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 09:26:47 +00:00
Adolf Belka
2071b2964f graphs.pl: Fixes graph failure when the DROP_HOSTILE directory is missing
- If a fresh install is done then only the DROP_HOSTILE_IN & DROP_HOSTILE_OUT
   rrd directories are created.
- With the DROP_HOSTILE directory missing then when the fwhits graph is updated an error
   message is caused by the inability to open the required files.
- This patch adds an if/else loop into the fwhits graph code to deal with the two cases
   of the DROP_HOSTILE being present or not depending on the history and if a backup with
   logs has been restored from when DROP_HOSTILE was in use.
- Tested on vm testbed and created a historical line for the hostile data when it was not
   split
- There might be a simpler or better approach than this but it was the only option I
   could identify. I couldn't find anything about being able to use if loops within the
   RRD::Graph loop

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-14 19:01:44 +00:00
Michael Tremer
7c9a6cf163 firewall: graphs: Add a line for the total number of hostile hits
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-07 11:02:41 +00:00
Adolf Belka
216d4bfc3d graphs.pl: Fixes bug12981 - Creates in and outgoing drop hostile graph entries
- This v3 version of the patch set splits the single hostile networks graph entry into
   incoming hostile networks and outgoing hostile networks entries.

Fixes: bug12981
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
Michael Tremer
dbf1d1634b web-user-interface: Update interface design
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-10 12:13:04 +00:00
Jon Murphy
81feac13b1 manualpages: correct link to dns help page
- point the dns help link to "configuration/network/dns-server"

Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2023-08-21 16:37:56 +00:00
Stefan Schantl
41d3d33dde update-ipblocklists: Fix loading new blocklists after update
* The script needs to run with root permissions in order to
  do the ipset operations. So remove code to drop the permissions
  on startup.

* Adjust execute calls to use the proper functions from
  general functions.

* Add some code to set the correct ownership (nobody:nobody) for
  changed files during script runtime.

Fixes #13072.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2023-04-04 19:59:23 +00:00
Adolf Belka
a84b9ed2fe header.pl: Add reference to colors.txt into header.pl
- With change of common css entries into header.pl with commit
   https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=b52a84ddc77f9db7e4ad7b129f21fbf528c6f990
   I had missed that color20 and color22 etc, that come from colors.txt, are not known in
   header.pl so that the alternate colours in tables were missing. Even though I tested the
   previous commit I obviously did not look well enough because I missed that the tables
   had no alternate colours. I just found it now when looking at Core Update 174 Testing.
- Confirmed by copying this version of header.pl into my CU174 Testing system and the
   alternate colour rows came back again as they should be. I am sure now that they are
   correct.

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>
2023-04-02 17:10:04 +00:00
Leo-Andres Hofmann
11f4726b0d graphs.pl: Make canvas fixed size and limit cpufreq color index
This fixes an issue where systems with many CPU cores
run out of usable graph colors and canvas area.
It also unifies the canvas size for all graphs.

Discussion: https://community.ipfire.org/t/cpu-freq-graph-not-working-with-i5-1235u/9396

Fixes: #12890

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-03-13 21:39:20 +00:00