Commit Graph

2839 Commits

Author SHA1 Message Date
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
Leo-Andres Hofmann
c13060fd4c menu: Fix warnings, clean code
This patch adds default values and removes a missing translation
to fix "uninitialized value" and "odd number of elements" warnings.

Removes function calls from functions.pl that have already been
handled by the header before it is loaded by eval().

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2022-04-23 14:34:00 +00:00
Stefan Schantl
1febad2ad4 ids.cgi: Avoid doubble locking the page when forcing a ruleset update.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-22 05:45:56 +02:00
Stefan Schantl
07dc722f61 ids.cgi: Make the page lock in oinkmaster_web() function optional.
This allows to call and release the page lock manually.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-22 05:44:23 +02:00
Stefan Schantl
eaf5364413 ids.cgi: Disable manual update button if a provider is not longer
supported.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-17 15:21:20 +02:00
Stefan Schantl
6bef05b9ed ids.cgi: Proper handle providers which are not longer supported.
They will be shown with a different background colour to get the users
attention.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-17 15:03:56 +02:00
Stefan Schantl
da5c7c24f0 ids.cgi: Remove orphaned headline.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-16 16:02:28 +02:00
Stefan Schantl
5bad33e9a4 ids.cgi: Display return code on download error, when adding a new
provider.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-16 15:32:27 +02:00
Stefan Schantl
00271ed769 ids.cgi: Handle "Not modified" when forcing an ruleset update.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-16 15:30:03 +02:00
Stefan Schantl
b645f7fc86 ids.cgi: Do not longer use hard-coded status messages in
oinkmaster_web() function.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-16 15:12:58 +02:00
Stefan Schantl
a15c9b16b4 IDS: Move autoupdate logic to cron.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-15 05:59:33 +02:00
Stefan Schantl
2f154264a0 ids.cg: Regeneate ruleset if the ruleset action (mode) of a provider
get changed.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-14 05:16:25 +02:00
Stefan Schantl
149a3291df ids.cgi: Do not double display a working notice when removing a ruleset
provider.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-11 05:47:15 +02:00
Stefan Schantl
faa8c62f63 ids.cgi: Use new oinkmaster_web function instead the silent one from
ids-functions.

This will print some nice status messages while the page is locked and
the IDS rules get regenerated/altered.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-10 11:25:36 +02:00
Stefan Schantl
44d41fd692 ids.cgi: Add oinkmaster_web () function.
This function is used to regenerate the entire ruleset similar to the
one from ids-functions, but is enhanced to print additional status
messages.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-10 11:23:49 +02:00
Stefan Schantl
1aaa347774 ids.cgi: Allow to split working_notice function into two parts.
This allows to open the notice and close it at a later time.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-10 11:19:41 +02:00
Stefan Schantl
25652a75d4 ids.cgi: Keep IDS/IPS mode settings when enabling/disabling a provider
or autoupdate for it.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-10 11:17:05 +02:00
Stefan Schantl
30c4a9ff35 ids.cgi: Adjust code to use new used-rulesfiles backend.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-04-09 15:00:21 +02:00
Leo-Andres Hofmann
4c04960ba0 getrrdimage.cgi: Add default values to parameters
Prevents "use of uninitialized value" warnings when the
CGI is called with broken undefined GET parameters.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-06 17:16:33 +00:00
Peter Müller
430680f9cc Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-04 20:20:48 +00:00
Adolf Belka
31016a38e6 dhcp.cgi: Add domain-list type info in dhcp options - bug#12819
Fixes: bug#12819
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-04-04 20:09:41 +00:00
Peter Müller
f31cb9a1dd Revert "qos.cgi: Removed last two P2P lines"
This reverts commit 652da33c01.

https://lists.ipfire.org/pipermail/development/2022-April/013014.html
2022-04-04 18:09:29 +00:00
Matthias Fischer
652da33c01 qos.cgi: Removed last two P2P lines
P2P "has left da house"...

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-04 05:35:52 +00:00
Matthias Fischer
705e948939 Changed notification for reloading firewall rules
I think 'fw rules reload...' is more logical.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-03 09:58:25 +00:00
Stefan Schantl
fa7663a1b5 ids.cgi: Remove newly added provider if the rules could not be
downloaded.

When adding a new provider and in case the rules file or tarball can not
be downloaded, the provider remains as configured.

To avoid that, the provider needs to be removed again.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 12:26:35 +01:00
Stefan Schantl
432b8ed21e ids.cgi: Drop last fragments from old modify sids backend.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 11:54:19 +01:00
Stefan Schantl
443ad51d1c ids.cgi: Allow to configure IDS/IPS mode individually for each provider.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 11:37:21 +01:00
Stefan Schantl
4c98be8bd2 ids.cgi: Use new provider modifications backend.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 11:37:02 +01:00
Stefan Schantl
9f353f8518 ids.cgi: Use new backend to store the ruleset modifications of a
provider.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-26 11:36:44 +01:00
Peter Müller
2188812cb0 credits: Run ./make.sh update-contributors
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-22 07:55:16 +00:00
Peter Müller
e90c62b2e3 connections.cgi: Update links to SANS ISC
Fixes: #12783

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-20 15:19:49 +00:00
Matthias Fischer
834227f2c8 ids.cgi: Added topic for ruleset actions
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-14 15:15:39 +00:00
Matthias Fischer
800290ce2a ids.cgi: Fixed trivial typos in comment
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-14 15:15:17 +00:00
Stefan Schantl
fad7d1c4c6 ids.cgi: Only read-in ignored hosts, if the ignore file exists.
Otherwise the CGI will crash.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:46:15 +00:00