summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/captiveportal.inc
Commit message (Collapse)AuthorAgeFilesLines
* Captive portal: fix "Disconnect All" buttonplumbeo2017-02-211-0/+1
|
* Captive portal: make captiveportal_disconnect_all() fasterplumbeo2017-01-111-15/+11
| | | | | | | captiveportal_disconnect_all() removes the users one at a time and in some cases, when many hundreds of users are connected, can take up to several dozens of seconds to complete. Instead of looping through all users, send all the accounting information, reset the user database and delete all the active rules and reinit them. Use locking to prevent new users from logging in until the function ends. (cherry picked from commit 47f967856ef25557d87430026e8b208a8852381f)
* Captive portal: rework logging and RADIUS accounting when disabling a zone ↵plumbeo2017-01-041-26/+26
| | | | | | | | | | or rebooting Make captiveportal_radius_stop_all() log the disconnections in the system log and fix it so that it works with the zone id parameter and sends complete RADIUS accounting packets. Since several zones can share the same RADIUS server, send an Accounting-Off packet only when rebooting, not when disabling a zone. (cherry picked from commit 3ece6d5404e0d4a53243d12e6b58793fad66dd5a)
* Captive portal: use locking to avoid race conditions between ↵plumbeo2017-01-041-0/+12
| | | | | | | | rc.prunecaptiveportal and captiveportal_disconnect_all() Convert rc.prunecaptiveportal to lock()/unlock()/try_lock() and use the lock to ensure that there aren't race conditions between it and captiveportal_disconnect_all(). (cherry picked from commit d793617ee9b4c3f66575737df3e8f6cf04e7c782)
* Captive portal: work around race condition between ↵plumbeo2017-01-041-6/+5
| | | | | | | | | | | | | | | | captiveportal_disconnect_all() and captiveportal_prune_old() Captiveportal_disconnect_all() loops through the active users and disconnects them immediately but doesn't remove them from the user database, only adding them to a list that is processed after the end of the loop. Since the loop can take several seconds if there are many users connected, captiveportal_prune_old() can be called after some users have been disconnected but before they're removed from the database. When this happens and the user has an idle timeout set, captiveportal_prune_old() tries to find the last activity time and gets an invalid value because the user has already been removed from the fw table, so it uses the login time as last activity time. Finally, if the login time is more than one idle timeout in the past, it tries to disconnect again the user and sends a RADIUS Accounting-Stop packet with termination-cause Idle-Timeout and zero Acct-Input-Octets/Acct-Output-Octets that overwrites the correct packet sent by captiveportal_disconnect_all(). To work around it, remove the users from the database before disconnecting them (this fixes only the case where captiveportal_disconnect_all() runs before captiveportal_prune_old()). (cherry picked from commit 025ec94a3285c129d2e14b00b629e811b83a9330)
* Captive portal: add button to disconnect all usersplumbeo2016-12-271-0/+26
| | | | | | Add a function to disconnect all logged in users and a button to call it in the captive portal status page. (cherry picked from commit feab4e54a446050555f4708d173977968f58918d)
* Fix bandwidth limitation in mac passthrough authJonatan Ramos2016-12-071-9/+9
| | | | (cherry picked from commit aa1c6774927fd6e1b11a9315900035c0e084fd82)
* Captive portal: add option to include idle time in total session timeplumbeo2016-12-061-1/+3
| | | | | | Add an option to choose whether the time spent idle by a user disconnected for exceeding the idle timeout must be included in the total session time sent to the RADIUS server or not. (cherry picked from commit 1878e1c932fa467956ef44d4bd39adb7d4d21243)
* Fix reversed accounting styleplumbeo2016-12-021-1/+1
| | | | (cherry picked from commit f3838572c59ea5ebe656851511c75d217afec815)
* Move copyright from ESF to NetgateRenato Botelho2016-09-061-1/+1
|
* Review license / copyright on all files (final round)Renato Botelho2016-07-151-1/+1
|
* Review license / copyright on all files (1st round)Renato Botelho2016-07-141-53/+54
|
* Update include() to include_once()Phil Davis2016-06-281-1/+1
| | | | | | | | | | For safety, use include_once() when including various "side" files. There are a couple of instances of include("guiconfig,inc") that I changes to use require_once() to be consistent with everywhere else. The remaining cases of include() are just (hundreds of) head.inc and footer.inc - those are only at the start/end of the ordinary top-level interactive PHP files. There is no nested interaction of those to think about, so that should be fine.
* Fix #6278Renato Botelho2016-05-121-3/+3
| | | | | | | | | $cpzone is always in lowercase, it's used as the array key used in config.xml. Use it in two cases where the $cp['zone'] was being wrongly used: - To find out zoneid - To replace PORTAL_ACTION url
* Escape username before use in CP SQLPhil Davis2016-04-191-1/+1
| | | | | A maybe "better" version to try. (cherry picked from commit 0a02fc5eefb265e0684d4447bf0a7c2a9687a188)
* Handle single quotes in user names for CPPhil Davis2016-04-191-1/+1
| | | | | | Forum: https://forum.pfsense.org/index.php?topic=110243.0 This is a trial - make sure it really works before committing. (cherry picked from commit 6fb36cdd74dd005a9a2bc799889978b4897e6dcf)
* Specify the zone in the PORTAL_ACTION URL. Ticket #6037Chris Buechler2016-03-281-2/+2
|
* HTML Compliance - CaptiveportalNOYB2016-03-221-6/+6
| | | | Text Align & Background Color
* Internationalize etc inc a-i filesPhil Davis2016-02-171-11/+21
|
* Fix RADIUS spelling. It is written in all caps.k-paulius2016-02-101-1/+1
|
* Fix multi-session time counting for the FreeRADIUS start/stop case. Ticket #2164jim-p2016-02-041-1/+8
|
* Add option for FreeRADIUS-friendly stop/start RADIUS accounting updates.jim-p2016-01-281-3/+16
| | | | It needs a sleep between the stop and start, and it needs slightly different figures for start/stop time in the request.
* Initialize $stop_time inside foreach to make sure it resets to proper value ↵Renato Botelho2016-01-201-1/+1
| | | | each iteration since it's changed inside loop. Reported on https://github.com/pfsense/pfsense/pull/2487
* Remove ORIGINAL_PORTAL_IP, it was never used.Chris Buechler2016-01-191-2/+0
|
* Update license on files from /etc/incRenato Botelho2016-01-151-21/+38
|
* un-break SVG graphsChris Buechler2016-01-051-1/+1
|
* start converting CP to nginxChris Buechler2016-01-051-5/+5
|
* start switching CP to nginxChris Buechler2016-01-051-11/+11
|
* Flush zone's tables if its db must be reset to avoid leaving behind any ↵Chris Buechler2015-12-171-1/+14
| | | | table entries. Ticket #5622
* Add busytimeout of 60 seconds for CP database access. This matches the ↵Chris Buechler2015-12-171-0/+4
| | | | default value PHP uses with sqlite 2.x versions (pfSense 2.1.x and earlier) and prevents the issues noted in Ticket #5622
* Fix handling of 0-byte files uploaded to the CP file manager.jim-p2015-12-151-1/+5
|
* Remove all pfSense_MODULE and pfSense_BUILDER_BINARIES definitions, whatever ↵Renato Botelho2015-12-151-5/+0
| | | | was the reason they were added, it was never finished and it's not being used
* Code style and white space in etcPhil Davis2015-12-101-1/+2
|
* Sanitize the session_id/logout_id in captive portal.Chris Buechler2015-12-021-0/+1
|
* Bug #2155fischeol2015-11-271-0/+2
| | | Fix of Bug #2155
* Fix the captive portal rules after 98bf4991dc31f97fc7315a6b8aba433de9d39cea.Luiz Otavio O Souza2015-10-191-10/+4
| | | | | | The malformed rules breaks the parsing of initialisation rules. Issue: #4746
* Only need to check 'vip' here.Chris Buechler2015-09-301-1/+1
|
* Can't use continue here as it continues the foreach, which skips the "ipfw ↵Chris Buechler2015-09-301-6/+5
| | | | zone" command, breaking CP for any system that doesn't have VIPs defined.
* For captive portal, if a user reloads index.php of the portal while already ↵jim-p2015-08-251-0/+11
| | | | | | logged in, show the logout page instead if it's custom. Must be a custom logout page that does not include a redirect.
* Move main pfSense content to src/Renato Botelho2015-08-251-0/+2409
OpenPOWER on IntegriCloud