Commit Graph

1920 Commits

Author SHA1 Message Date
Michael Tremer
e2bd5a6eb9 captive: Allow editing terms in coupon mode
Since the terms are always shown when set, we need a way
to edit them in coupon mode as well.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-11 14:52:03 +01:00
Erik Kapfer
b66b02ab73 OpenVPN: Fix for '--ns-cert-type server is deprecated' .
- Added extended key usage based on RFC3280 TLS rules for OpenVPNs OpenSSL configuration,
so '--remote-cert-tls' can be used instead of the old and deprecated '--ns-cert-type'
if the host certificate are newely generated with this options.
Nevertheless both directives (old and new) will work also with old CAs.

- Automatic detection if the host certificate uses the new options.
If it does, '--remote-cert-tls server' will be automatically set into the client
configuration files for Net-to-Net and Roadwarriors connections.

If it does NOT, the old '--ns-cert-type server' directive will be set in the client
configuration file.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-11 11:55:16 +01: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
Peter Müller
e34e72b6e1 add missing check for Curve25519 in vpnmain.cgi
This fixes bug #11501 which causes IPsec connections to crash if
Curve25519 has been enabled.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-09 14:54:37 +01:00
Michael Tremer
bef7ad5bbe captive: Fix saving empty terms
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-09 14:34:21 +01:00
Michael Tremer
bbc69f228d captive portal: Correctly initialise an array for 8h timeout
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-05 11:11:32 +01:00
Michael Tremer
027614d2dc Merge branch 'captive-portal' into next 2017-10-04 16:10:07 +01:00
Michael Tremer
0a219160ac captive portal: Allow sessions to expire after 8 hours
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-04 14:21:12 +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
Matthias Fischer
082771c1f4 proxy.cgi: Some cosmetics for the absolutely lazy ones (V2)
Added clickable links for 'URL filter' and 'Update accelerator' for faster access,
this time without the need to alter the language-files.

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-24 20:22:45 +01:00
Michael Tremer
5f1b951102 captive: Show access page in browser language
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Daniel Weismüller <daniel.weismüller@ipfire.org>
2017-09-22 19:00:04 +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
792f1a3bdf captive: Drop duplicate function to list active clients
There was a function with different name but essentially
same functionality which is already existant in &show_clients().

Therefore this patch drops the old function without any functional
changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
41964aba09 captive: Redesign clients list box
Mostly code cleanup

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
a0b271e474 captive: Redesign generated coupons table
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
733932de74 captive: Correctly set coupon lifetime
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
9cba29f119 captive: Remember selected coupon expiry time
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
5cd9e28bc4 captive: Allow creating multiple coupons in bulk
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
4f75fbfe12 captive: Cleanup coupon generation block
No functional changes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
810198110e captive: Cleanup logo upload
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
e7d16ea553 captive: Cleanup authentication selection
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
a41fe924ae captive: Code cleanup
No functional changes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
b7a126d9c8 captive: Allow uploading JPEG images, too
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
e2752bfe71 captive: Save logo in /var/ipfire/captive
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
278309b9ef captive: Allow selecting the session expiry time for terms
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:56:04 +01:00
Michael Tremer
297ebdd47b captive: Group settings together and create branding section
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:55:27 +01:00
Michael Tremer
827d3f61da captive: Some more CGI cleanup
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:55:27 +01:00
Michael Tremer
97b91e8a94 captive: Rename "Voucher" mode to "Coupon"
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:55:27 +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
4b33d29de7 captive: Refactor the access page
This brings no functional changes, but cleans up the code
to re-use more and write less.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:55:27 +01:00
Michael Tremer
dbfd2622f5 captive: Get MAC address of a device without calling arp
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
Michael Tremer
a2c26388db captive-portal: Use template engine to render HTML template
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
0a02d9bb0c captive-portal: Move CGI files to CGI directory
Previously the assets directory has ExecCGI privileges
which is not at all required and potentially dangerous.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
d57e8c67bc captive-portal: Code cleanup
No functional changes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
11fc9575d7 captive: Fix bug with multiple license clients
If one active client with a license existed, any other client
authenticating will overwrite the configuration line.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
59a2d9c2d5 Captive-portal: Design changes
When choosing voucher as authentication type there is no need to display the license agreement textbox

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
0806170370 BUG11141: Redesign of configuration website
To improve the user experience, the configuration part of generating new vouchers has been reworked.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
213335372d BUG11140: Captive logo dimensions
Now the min and max logo dimensions are shown in webinterface.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
6945954c44 BUG11137: Captive save action messes up the form
When configuring the captiveportal for the first time the form
will be empty after clicking on save button if not all relevant fields are set.

Now the settings are stored even if there is an error.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
1d77d1262a BUG11139: Captive voucher table too wide
Set table to 100% and the remark textfield to 96% (cellwidth)

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
45129439bc Captive-Portal: fix fontsize of generated voucher
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00