LuCI - OpenWrt Configuration Interface
Find a file
Jo-Philipp Wich a58370ab74 Rework authentication system
The validity of authentication tokens was determined by the
mtime of respective authentication tokens on filesystem
stored in $sessionpath.
Talking about hardware without RTC or without a prior
connection to a time server, date/time usually around 1970 -
so is the mtime of the authentication token file in
$sessionpath.

When now configuring an internet connection via LuCI, the
system might fetch the current date/time (e.g. via ntp)
which invalidates the token, returns "403 Forbidden" and
kicks the user out of the interface.

This patch changes the authentication system to use time values
based on the uptime of the machine - rather than values based upon
gettimeofday() and {a|m}time values - and save them inside the token.
That way can always determine the difference between login
(last interaction respectively) and the current time, in-
dependant of the system clock jumping backwards/forwards.

Warning: This patch removes the clean() function and respective calls.
This means, invalid tokens will NOT be determined and removed from
filesystem automatically anymore.
Before, every HTTP-call caused a scan for invalid tokens,
which is quite expensive. Instead consider using a cron job
deleting all stalled files periodically.

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

Signed-off-by: Mirko Vogt <mirko@openwrt.org>
2012-08-07 19:11:56 +00:00
applications applications/luci-ushare: add description (#458) 2012-07-24 11:54:29 +00:00
build build: i18n-sync.sh: also recreate base.pot 2012-07-01 22:58:17 +00:00
contrib meshwizard: Fix olsrd plugin setup/renaming 2012-08-02 18:32:41 +00:00
i18n i18n: package hungarian translations 2012-04-02 09:48:31 +00:00
libs Rework authentication system 2012-08-07 19:11:56 +00:00
modules Rework authentication system 2012-08-07 19:11:56 +00:00
po po: sync ushare translation 2012-07-24 11:55:14 +00:00
protocols add IPv6 and MTU override for L2TP 2012-07-05 04:22:16 +00:00
themes themes: only check password for uid=0 pages, nobody cannot read shadow (#426) 2012-06-06 10:44:55 +00:00
.buildpath * new project: ff-luci - Freifunk Lua Configuration Interface 2008-03-02 21:52:58 +00:00
.cproject More C-Functions (luci.cutil.instanceof, luci.cutil.pcdata) 2008-11-20 19:22:05 +00:00
.gitignore Added "apidocs" target to Makefile 2008-07-29 21:16:12 +00:00
.project LuCI Core C-Rewrite: First steps 2008-11-19 23:02:36 +00:00
INSTALL HTTP is sufficient for plain checkouts, Schäuble could also do checkouts before by himself 2009-01-02 21:42:49 +00:00
LICENSE * new project: ff-luci - Freifunk Lua Configuration Interface 2008-03-02 21:52:58 +00:00
Makefile build: only consider directories containing a Makefile, fixes compilation crashes if a file or empty directory exists in modules/, applications/ etc. 2012-01-05 19:21:07 +00:00
NOTICE Add axTLS sourcecode 2009-02-22 23:19:25 +00:00
THANKYOU * luci: replace all "OpenWRT" occurences with "OpenWrt" 2008-10-27 15:19:58 +00:00