luci-mod-rpc: fix authentication via query string parameter
authorJo-Philipp Wich <jo@mein.io>
Sat, 5 May 2018 17:51:20 +0000 (19:51 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sat, 5 May 2018 17:56:26 +0000 (19:56 +0200)
Localize the `authenticatior()` and `session_retrieve()` functions into the
`index()` function scope so that they're retained when extracting the
function into the dispatcher bytecode cache.

Also allow access to the global scope since upvalues do not work reliably
due to the out-of-context byte code caching of index functions.

Fixes https://github.com/openwrt/luci/issues/1300#issuecomment-381352765
Fixes feefc600e ("luci-mod-rpc: rework authentication and session handling")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>

No differences found