93 Commits

Author SHA1 Message Date
Rob White
3f17e681bb Fix - Path Traversal Attack vulnerability allowed by libmicrohttpd's built in unescape functionality
Signed-off-by: Rob White <rob@blue-wave.net>
2020-05-06 20:21:22 +01:00
Rob White
40f2ca3ff8 Fix PKG_BUILD_DIR in OpenWrt Makefile
Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-13 20:32:25 +01:00
Rob White
9f4661e08b Release v5.0.0
Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-11 14:30:58 +01:00
Rob White
80e1d09cb4 Move wait_for_interface to opennds C code
wait_for_interface was in the startup init.d/procd and opennds.service scripts.
Moved to opennds C code.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-09 21:53:08 +01:00
Rob White
228c117408 Fix firewall restart script
Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-09 13:38:27 +01:00
Rob White
3d1033d39e More renaming, new splash image.
Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-05 16:53:33 +01:00
Rob White
7b8d54766a Bump to v4.5.1beta
Signed-off-by: Rob White <rob@blue-wave.net>
2020-03-03 22:20:04 +00:00
Rob White
965cbb8b9d Release 4.5.0
Changelog:
  * Add - Enable https protocol for remote FAS [bluewavenet]
  * Add - trusted devices list to ndsctl json output [bluewavenet]
  * Add - option unescape_callback_enabled [bluewavenet]
  * Add - get_client_token library utility [bluewavenet]
  * Add - utf-8 to PreAuth header [bluewavenet]
  * Add - PreAuth Support for hashed id (hid) if sent by NDS [bluewavenet]
  * Add - library script shebang warning for systems not running Busybox [bluewavenet]
  * Add - htmlentityencode function, encode gatewayname in templated splash page [bluewavenet]
  * Add - htmlentity encode gatewayname on login page (PreAuth) [bluewavenet]
  * Add - Simple customisation of log file location for PreAuth and BinAuth [bluewavenet]
  * Add - option use_outdated_mhd [bluewavenet]
  * Add - url-encode and htmlentity-encode gatewayname on startup [bluewavenet]
  * Add - Allow special characters in username (PreAuth) [bluewavenet]
  * Add - Documentation updates [bluewavenet]
  * Add - Various style and cosmetic updates  [bluewavenet]
  * Fix - Change library script shebang to bash in Debian [bluewavenet]
  * Fix - Remove unnecessary characters causing script execution failure in Debian [bluewavenet]
  * Fix - Add missing NULL parameter in MHD_OPTION_UNESCAPE_CALLBACK [skra72] [bluewavenet]
  * Fix - Script failures running on Openwrt 19.07.0 [bluewavenet]
  * Fix - Preauth, status=authenticated [bluewavenet]
  * Fix - Prevent ndsctl from running if called from a Binauth script. [bluewavenet]
  * Fix - Minor changes in Library scripts for better portability [bluewavenet]
  * Fix - Prevent php notices on pedantic php servers [bluewavenet]
  * Fix - broken remote image retrieval (PreAuth) [bluewavenet]
  * Fix - Allow use of "#" in gatewayname [bluewavenet]

Signed-off-by: Rob White <rob@blue-wave.net>
2020-03-03 21:44:05 +00:00
Rob White
a7ef01f413 Enable https protocol for remote FAS
Previously a remote FAS could not use https protocol without generating
browser security errors or warnings so NDS enforced use of http.

A new FAS level, fas_secure_enabled = 3 is introduced here.

Level 3 is the same as level 2 except the use of https protocol is
enforced for FAS. In addition, the "authmon" daemon is loaded.

This daemon allows the external FAS, after client verification is complete,
to effectively traverse inbound firewalls and address translation to
achieve NDS authentication without generating browser security warnings.
or errors.

A fully functional https fas script is provided (fas-aes-https.php).

Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-29 16:50:07 +00:00
Rob White
aa54541fca Fix comments in config files
Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-17 00:12:38 +00:00
Rob White
2a2b3693cc Fix: Allow use of "#" and "'" (single quote/asterisk) in gatewayname
See issue #516

"#" is used as a comment indicator in nodogsplash.conf
This fix allows the character to be present as part of an option value.
If the character occurs at the beginning of the line,
the line will be considered as a comment.

"'" (single quote/asterisk) is used as a uci delimiter.
If this character is required in gatewayname then use the
htmlentity &#39; instead.
The default config files have been updated to reflect this.

The demo preauth scripts have been modified to ensure
gatewayname is properly escaped.


Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-15 15:59:48 +00:00
Rob White
15ba5ea4c8 Add option use_outdated_mhd
See issue #515

MHD_get_version is used to determine the installed (runtime) version of
libmicrohttpd (MHD).
If the version is earlier than 0.9.69, then by default, NDS will terminate.

However, if option use_outdated_mhd is set to 1, NDS starts normally
but logs an error.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-10 20:58:40 +00:00
Rob White
9fb70f3ce2 Add option: option unescape_callback_enabled
Disabled is 0 (default)
Enabled is 1

This allows custom unescape  in MHD.

MHD needs to unescape characters sent in query strings by browsers.
When this option is disabled, MHD uses its builtin unescape.
When enabled, MHD uses /usr/lib/nodogsplash/unescape.sh

The unescape.sh library is safe as all incoming queries are escaped
by the client browser and the argument containing string to be unescaped
is quoted by NDS.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-05 19:41:50 +00:00
Rob White
84594da947 Add get_client_token library utility
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-11 16:18:17 +00:00
Rob White
112547a7aa bump to v4.4.1beta
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-09 11:14:21 +00:00
Rob White
766db1388e Bump to version 4.4.0
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-09 09:34:27 +00:00
Rob White
f52f70300e Update config file
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-05 21:31:17 +00:00
Rob White
64224223bd fwhook restart - do not use ndsctl to test if nds running
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-05 21:31:17 +00:00
Rob White
36f94f4972 Implement unescape callback for MHD (libmicrohttpd)
This is a fix to allow "+" and "&" characters in user data passed to MHD in get requests.
Reported in issue #476, this effected PreAuth and Binauth.
"+" and "&" characters can now be used in form data, eg passwords etc.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-01 15:57:45 +00:00
Rob White
423e328fab fas: get the client interface connections.
When option fas_secure_enabled '2' is set, get the client interface connections.

The client interface connections string is of the form:
[localif] [remotemeshnodemac] [localmeshif]
This is added to the query string as "clientif".
[remotemeshnodemac] and [localmeshif] will be null if  the client is connected
to a local interface or 802.11s mesh networking is not active.

This can be used to change the response of the FAS captive portal login page,
depending on the interface the client is connected to.

Connections to local wireless interfaces and
remote 802.11s mesh node connections are detected.

Signed-off-by: Rob White <rob@blue-wave.net>
2019-12-29 21:48:18 +00:00
Rob White
ab10da729e Bump to v4.3.4
Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-20 07:25:20 +01:00
Rob White
e995d59e92 Version 4.3.3
Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-19 14:16:15 +01:00
Rob White
b040820407 Fix: Memory corruption at high loads.
*  Symptom was spontaneous restart of NDS often with no errors.
  *  Caused by coding error introduced by previous changes.
  *  Added improved checking and debuglevel logging when calling MHD.
  *  Added debuglevel logging for case of firewall restart.
  *  Return error 403(forbidden) rather than 503(internal server error) when client attempts to use a forbidden http method.
  *  Return error 403(forbidden) rather than 503(internal server error) when client attempts to use an invalid ip or mac address.
  *  Revert QUERYMAXLEN to 4096 bytes to prevent query string truncation when a client session deauthenticates whilst client is using some types of vpn software.

Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-17 10:57:25 +01:00
Rob White
44186e103f Bump to v4.3.3beta
Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-10 14:29:40 +01:00
Rob White
539aee87f9 Bump to version 4.3.2beta
Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-09 17:05:35 +01:00
Rob White
0a4f84863d nodogsplash: Version 4.3.1
This version provides the fix to an issue in Makefile, introduced in the previous version, that prevents the Debian package from being created.

This does not effect the OpenWrt package.

There are no other changes from v4.3.0

Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-09 15:03:20 +01:00
Rob White
3c4382f10b Bump to v4.3.1beta
Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-08 12:35:13 +01:00
Rob White
9f25ba9f85 Release 4.3.0
* Create switch option to select preinstalled templated splash or preauth login [bluewavenet]
  * Limit PreAuth and BinAuth log size in example scripts [bluewavenet]
  * Reduce memory requirements and autoselect logfile location [bluewavenet]
  * Create fas-hid example script [bluewavenet]
  * Update FAS, PreAuth and BinAuth example scripts [bluewavenet]
  * Hash client token (hid) for remote FAS enabling secure FAS for legacy/low-flash/low-ram hardware [bluewavenet]
  * Fix NDS Uptime if NTP client is enabled [bluewavenet]
  * Documentation updates for this release [bluewavenet]
  * Fix numerous compiler warnings [mwarning]
  * Fix openwrt fw_mark option type [mwarning]

Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-08 08:08:08 +01:00
Rob White
389f845061 Create option login_option_enabled
Allows simple switch between templated splash page and preauth login script.
Disabled:
option login_option_enabled '0'
use config options for FAS if set, or Templated Splash

Enabled:
option login_option_enabled '1'
use preauth login script providing username/email login with access log

Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-06 16:27:24 +01:00
Rob White
cc73242e5a Update comments - openwrt fw_mark_* option type
Update comments in config file

Signed-off-by: Rob White <rob@blue-wave.net>
2019-09-18 13:06:47 +01:00
Moritz Warning
55628d10f8 fix openwrt fw_mark_* option type 2019-09-15 21:30:47 +02:00
Rob White
764faf09f7 Bump to version 4.2.1beta
Signed-off-by: Rob White <rob@blue-wave.net>
2019-09-13 21:52:25 +01:00
Rob White
8f7b32906d Bump to version 4.2.0
Signed-off-by: Rob White <rob@blue-wave.net>
2019-09-13 21:16:03 +01:00
Rob White
4028cc030c Bump to v4.1.1beta
Signed-off-by: Rob White <rob@blue-wave.net>
2019-09-02 20:58:58 +01:00
Rob White
ed36e50b61 Bump to v4.1.0
Signed-off-by: Rob White <rob@blue-wave.net>
2019-09-02 20:25:20 +01:00
Rob White
b357f6716d Bump to v4.0.3beta
Signed-off-by: Rob White <rob@blue-wave.net>
2019-08-15 16:06:17 +01:00
Rob White
89a0aadc5b Bump to version 4.0.2
Signed-off-by: Rob White <rob@blue-wave.net>
2019-08-15 15:20:14 +01:00
Rob White
567fc92645 PreAuth Override FAS settings, update DOCS, configs and css
Signed-off-by: Rob White <rob@blue-wave.net>
2019-08-13 13:17:04 +01:00
Rob White
17de36487b ndsctl: json - make parsing consistent for all vars
Signed-off-by: Rob White <rob@blue-wave.net>
2019-08-12 18:02:14 +01:00
Rob White
9945d95e2f Bump to version 4.0.2beta
Signed-off-by: Rob White <rob@blue-wave.net>
2019-07-29 21:45:15 +01:00
Rob White
02cd44feba Bump to Version 4.0.1
Signed-off-by: Rob White <rob@blue-wave.net>
2019-07-29 20:57:39 +01:00
Rob White
27e8604427 Write log to SYSLOG. Make debuglevel 0 silent except for LOG_ERR
Signed-off-by: Rob White <rob@blue-wave.net>
2019-07-29 10:50:10 +01:00
Moritz Warning
cdb941d024 config: udpate debuglevel in config files 2019-07-28 20:26:25 +02:00
Moritz Warning
4d0610cb24 openwrt: procd does not read from syslog 2019-07-28 20:25:40 +02:00
Rob White
a17d43852d Update WebRoot in uci config file
Signed-off-by: Rob White <rob@blue-wave.net>
2019-07-13 08:44:06 +01:00
Rob White
7df96a0610 Bump to release v4.0.0
Signed-off-by: Rob White <rob@blue-wave.net>
2019-07-07 16:21:27 +01:00
Rob White
664f986ce2 Add fasremotefqdn, faskey.
Simple configuration of fas running on remote shared hosting server.
Encrypt the query string sent to remote FAS.
Documentation Updates.
Bumping to v4.0.0

Signed-off-by: Rob White <rob@blue-wave.net>
2019-07-07 14:26:27 +01:00
Moritz Warning
28541e787c remove unused pagesdir and imagesdir (#378) 2019-07-02 11:12:34 +02:00
Alexander Couzens
67b314d7af openwrt: initscript: add missing macmechanism in the config file
The init script could parse the macmechanism and the mac lists, but it forgot to
add the macmechanism to the configuration itself
2019-06-14 23:54:54 +02:00
Rob White
ae24cc7404 Bump to version 3.3.3-beta
Signed-off-by: Rob White <rob@blue-wave.net>
2019-04-23 13:43:22 +01:00