Commit Graph

201 Commits

Author SHA1 Message Date
Vincent Li
4885bc8554 wireguard.cgi: add css color style for VPN peer status
ipfire has changed theme css style and wireguard.cgi relies
on the new css style, replace the bpfire css style with ipfire style
breaks other cgi style, so make the change minium that is only
relevant to wireguard.cgi VPN peers status.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-07 21:10:23 +00:00
Vincent Li
a3f7758510 functions.pl: add missing sub routine for wireguard.cgi
wireguard.cgi calls errorbox and opensection/closesection,
but they are missing from header.pl. ipfire had functons.pl
removed and moved subroutines to header.pl and added errorbox
in header.pl. to keep the change minimum so not affect other
features, add errorbox and opensection/closesection in functions.pl

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 17:17:14 +00:00
Vincent Li
638483ff08 wireguard.cgi: Add CGI to configure wireguard
commit 06dbc836a47160d51ab10f8b9d4ca356beaa7cdb
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Tue Apr 16 18:06:47 2024 +0200

        wireguard.cgi: Add a basic CGI to configure the global settings

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 17:03:32 +00:00
Vincent Li
c834aa67d4 WebUI: change donation link to bpfire maintainer
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-09 04:29:12 +00:00
Vincent Li
13bb8928c9 Change header from IPFire_ to BPFire_
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 01:26:16 +00:00
Michael Tremer
b4880b752e web-user-interface: Force browsers to reload the changed CSS
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-25 10:22:18 +00:00
Michael Tremer
0e415928b7 web-user-interface: Replace the old tux logo with out new word mark
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-01-10 12:23:15 +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
Adolf Belka
8e6bf12f14 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 as a 12x12 pixel format and naming it openvpn_encrypted.png

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
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
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
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
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
Robin Roevens
2b25c02932 pakfire: Translate WUI header/footer text
Add en/nl/fr/de translations for:
  - Traffic: In XXX bit/s Out XXX bit/s
  - IPFire X.XX (xxx) - Core Update XXX ...

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-28 13:44:29 +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
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
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
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
Peter Müller
66c3619872 Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I
thought it might be a good idea to clean these up. Doing so, some
missing or inconsistent licence headers were fixed.

There is no need in shipping all these files en bloc, as their
functionality won't change.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 23:54:57 +00:00
Leo-Andres Hofmann
d235c1fd79 style.css: Add positive "z-index" to drop-down menu
Some input fields interfere with the menu items and block their use.
A z-index ensures that the menu is always rendered in the foreground.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-05 12:06:16 +00:00
Leo-Andres Hofmann
4d70f59173 pakfire: Implement feedback from mailing list discussion
- Improve lockfile test: Return immediately if lockfile is present,
to prevent unnecessary and expensive "pidof" calls

- Add better explanation to the log file reading command and JS

- Change user interface: If no errors occurred, the page returns to
the main screen (after a short delay). If an error occurred, the log
output remains and a message is shown.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:36:15 +00:00
Leo-Andres Hofmann
db9ee62e0a pakfire.cgi: Implement JavaScript log message display
Currently the page becomes unresponsive while Pakfire is busy.
This patch implements a AJAX/JSON driven log output, to provide
continuous information to the user while Pakfire is running.

The output is updated 1x per second, if the load should be too high,
the interval can be change by writing to "pakfire.refreshInterval".

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-01-14 14:35:57 +00:00
Leo-Andres Hofmann
b91a0f297a ipfire-theme/functions.pl: Load $extrahead after jQuery
This ensures that jQuery is also available for custom javascript
added to the HTML <head> with $extrahead.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2021-12-03 18:29:16 +01:00
Leo-Andres Hofmann
b0323d1946 webinterface: Add links to the configuration wiki
This patch adds a little "help" icon to the page header.
If a manual entry exists for a configuration page, the icon
appears and offers a quick way to access the wiki.
Wiki pages can be configured in the "manualpages" file.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2021-11-19 07:18:20 +01:00
Leo-Andres Hofmann
3cc3edeca4 RRD graphs: Remove padding around graph images
The images inherited padding from the general design and
have been resized to fit the layout, resulting in blurred graphs.
This removes the padding and shows the graphs in full size.

Fixes: #12657

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-09-02 09:01:46 +00:00
Michael Tremer
26a0befd75 IPsec: Add prototype to export Apple Configuration profiles
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-05 11:21:00 +00:00
Leo-Andres Hofmann
c095f81435 rrdimage: Improve CGI & cosmetic changes
Write graph error messages to the system log, to simplify
further inspection by the user.
Add additional parameter check to prevent a possible redirect loop
if the URL format is changed in the future.

Cosmetic: Use underlining instead of background color for highlighting

Fixes #10643

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-12 09:31:18 +00:00
Jonatan Schlag
71ae8d5a0d Delete all themes for the webinterface except the default one
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:13:02 +00:00
Jonatan Schlag
8186b37230 Hardcode theme to ipfire
This disables the theme support and makes it impossible to use any other
themes than the ipfire default theme.

The only intention of this patch is to hardcode the theme to ipfire.
To change any cgi we have is an ugly way, but the only way to do this
fast. The colour handling needs certainly to be improved as well, but
this will and should be done in other patches.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:11:34 +00:00
Leo-Andres Hofmann
9064bc7242 rrdimage: Add CSS and Javascript to ipfire theme
This patch adds styling for the new graph time range buttons
and loads the Javascript in the HTML head.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-06 10:03:44 +00:00
Leo-Andres Hofmann
910f1e8494 rrdimage: Add scripts for new graph display method
This patch adds two scripts which will later be used to display graphs:

-> getrrdimage.cgi: Generates PNG images for graphs.
Until now, each CGI with embedded graphs had to be able to output
images. These functions are now gathered in this new script.
The additional parameter handling can be removed and the CGIs can
be simplified. This makes it easier to use and output the graphs.

-> rrdimage.js: Interactive Javascript functions
This allows the user to select time ranges without reloading the page.
In addition, the graphs are now periodically updated, allowing users
to live monitor the data.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-06 10:01:15 +00:00
Leo-Andres Hofmann
6c958adf2f Remove unused snortupdateutility.js
This script doesn't seem to be maintained or used anywhere anymore.
The last reference to it was removed in commit 1772664.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-29 10:27:23 +00:00
Leo-Andres Hofmann
b4434345dc zoneconf.cgi: Add Javascript for new GUI elements
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-22 18:58:13 +00:00
Leo-Andres Hofmann
5c33a76135 zoneconf.cgi: Add NIC selection highlighting
This improves the usability of the zone configuration by marking assigned
NICs in the zone color. The highlighting is initially applied to the static
HTML output, and JavaScript is used to follow changes made by the user.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-27 15:48:02 +00:00
Peter Müller
b67e79a4f1 embed background image in redirect template
Embed the IPFire background image into the redirect template
directly via CSS instead of loading it from somewhere else.
This is necessary because of Content Security Policy (CSP).

This patch inserts the base64 encoded image during build so
nothing needs to be updated twice in case background image
changes.

It supersedes first to fourth version of this patch and has
been successfully tested during a clean build.

Fixes #11650

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 16:30:09 +01:00
Peter Müller
725396af2c link to HTTPS version of www.ipfire.org in WebUI
Change links to www.ipfire.org in WebUI themes since the website
now uses HTTPS.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-11-07 16:14:36 +00:00
Peter Müller
dc6ed83537 delete unused dial.cgi file
Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-10 12:22:19 +01:00
Michael Tremer
1f06098ba7 captive-portal: Serve Ubuntu font files locally
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-04 12:55:17 +01:00
Michael Tremer
963beecdb8 captive: Fix passing redirection URL
Reported-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 19:00:04 +01:00
Michael Tremer
45b1b7cf65 captive: Do not show checkbox when in coupon mode
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
497b910855 captive: Verify that the user actually accepted the terms and conditions
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
eb3e3017cb captive: Style any error messages
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
aed55ef9f8 captive: Show a message when no coupon code was entered
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
8b0679cc89 captive: Fix some template updates that I forgot
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
8802d70a28 captive: Serve logo through an extra CGI script
This CGI script makes saving the logo easier (especially for
backup purposes).

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
9735e1670a captive: Rename "License" mode to "Terms & Conditions"
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:55:27 +01:00
Michael Tremer
f8d35875d8 captive: Allow selecting highlight colour in web interface
To be able to customise the access page, we now allow the
user to select a brand colour.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:55:27 +01:00
Michael Tremer
966971e589 captive: Don't compare action string
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
48fb1d3b69 captive: Import new design
This is the new design of the access page of the captive
portal. It is based on the Bootstrap 4 grid system and
reboot but does not use anything else from it.

It is responsive and customisable.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00