<feed xmlns='http://www.w3.org/2005/Atom'>
<title>luci/modules/luci-lua-runtime/luasrc, branch master</title>
<subtitle>Lua Configuration Interface (mirror)</subtitle>
<id>https://git.openwrt.org/project/luci/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/luci/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/'/>
<updated>2025-10-02T13:43:16Z</updated>
<entry>
<title>luci-lua-runtime: Update sys.net.conntrack() to use to conntrack tool</title>
<updated>2025-10-02T13:43:16Z</updated>
<author>
<name>jpfox156</name>
</author>
<published>2022-02-25T13:27:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=c62117c665b9de6198a092e1f72d6c68134cbd51'/>
<id>urn:sha1:c62117c665b9de6198a092e1f72d6c68134cbd51</id>
<content type='text'>
Fall through to /usr/sbin/conntrack tool if /proc/net/nf_conntrack is
not available.

/proc/net/nf_conntrack has been obsoleted in recent kernels
(https://cateee.net/lkddb/web-lkddb/NF_CONNTRACK_PROCFS.html). This
change enables sys.net.conntrack() to return conntrack information via
the /usr/sbin/conntrack tool (if installed) instead.

Enables population of the /luci/admin/status/realtime/connections list.

Signed-off-by: James Fox &lt;jpfox156@yahoo.com.au&gt;
[ format using tabs ]
Signed-off-by: Paul Donald &lt;newtwen+github@gmail.com&gt;
</content>
</entry>
<entry>
<title>luci-lua-runtime: dispatcher.lua: re-add post_on() dispatch action</title>
<updated>2023-08-21T13:44:36Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2023-08-21T13:44:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=18b637fed9f58b7a3f146a004ecd5b0aef2cb058'/>
<id>urn:sha1:18b637fed9f58b7a3f146a004ecd5b0aef2cb058</id>
<content type='text'>
Existing legacy Lua controllers still use the `post_on()` node dispatch
action, so restore this functionality.

Fixes: #6531
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-lua-runtime: dispatcher.lua: re-add test_post_security()</title>
<updated>2023-08-21T13:35:41Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2023-08-21T13:35:41Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=2fd74a8239c3986bb2e741e907b2a90f2833f073'/>
<id>urn:sha1:2fd74a8239c3986bb2e741e907b2a90f2833f073</id>
<content type='text'>
While no LuCI code utilizes this function anymore, some existing legacy
Lua controllers expect the function to exist, so restore it.

Fixes: #6532
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-lua-runtime: fix legacy luci-mod-rpc authentication</title>
<updated>2023-04-29T22:27:47Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2023-04-29T22:19:35Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=2a9c3a3173e0cec686fb8d9fafb8c063f80958e4'/>
<id>urn:sha1:2a9c3a3173e0cec686fb8d9fafb8c063f80958e4</id>
<content type='text'>
The legacy RPC module authentication fixup was improperly ported into the
Lua dispatcher stub module, rendering legacy RPC authentication broken.

Additionally, the split of the former `sysauth` cookie into `sysauth_http`
and `sysauth_https` ones was also imposed upon the RPC module, without
leaving the option to use just `sysauth` in place, so allow this cookie
name again for the legacy RPC logins.

Fixes: #6333
Fixes: e1932592c3 ("luci-base: use different cookie names for HTTP and HTTPS")
Fixes: ded8ccf93e ("luci-base-ucode: add initial ucode based LuCI runtime")
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base, luci-lua-runtime: adjust Lua template environment</title>
<updated>2022-11-21T11:27:28Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-11-21T11:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=fa17c1573f88c24a8e7d7d6dce67ad0d27486084'/>
<id>urn:sha1:fa17c1573f88c24a8e7d7d6dce67ad0d27486084</id>
<content type='text'>
To maintain full compatibility with the old Lua runtime, templates
rendered from a menu `template()` action must implicitly inherit the
`luci.dispatcher` namespace as scope while other indirectly included
templates must not.

Fixes: #6105
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base, luci-lua-runtime: fix "dispatched" and "requested" properties</title>
<updated>2022-11-21T11:24:31Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-11-21T11:24:31Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=08ae8d40a939654d2e4a1774853c5c5683b12268'/>
<id>urn:sha1:08ae8d40a939654d2e4a1774853c5c5683b12268</id>
<content type='text'>
Ensure to properly emulate the "dispatched" and "requested" properties
which refer to the executed and initially resolved menu node respectivey.

Also stop exposing a `node` property in Lua context to maintain full
compatibility with the old Lua runtime.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-lua-runtime: proxy all dispatcher context property accesses</title>
<updated>2022-11-15T18:49:05Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-11-15T18:49:05Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=a1ee78fa696e13ad4e19c0252eb345500d4ab3ee'/>
<id>urn:sha1:a1ee78fa696e13ad4e19c0252eb345500d4ab3ee</id>
<content type='text'>
The ucode side dispatcher environment might not be fully populated yet
when the emulated Lua dispatcher is loaded, leading to `context.requested`
and some other properties to be `nil`.

Expose all properties through metatable `__index` lookups instead to
ensure that the Lua side dispatcher always sees the latest values.

Fixes: #6100
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-lua-runtime: preload luci.ltn12</title>
<updated>2022-11-10T23:42:14Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-11-10T23:42:14Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=0141732f87d04803d499792a6039a00a3ca9eeeb'/>
<id>urn:sha1:0141732f87d04803d499792a6039a00a3ca9eeeb</id>
<content type='text'>
Some existing legacy code expects the luci.ltn12 namespace to be implicitly
available, even without requiring it beforehand.

Fixes: #6091
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-lua-runtime: dispatcher.lua: translate legacy node "target" property</title>
<updated>2022-11-10T21:33:38Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-11-10T21:33:38Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=1da816ddf2b811ae98b5c05f1dbf84653071873e'/>
<id>urn:sha1:1da816ddf2b811ae98b5c05f1dbf84653071873e</id>
<content type='text'>
Some legacy Lua controllers declare menu entries by first invoking `node()`
and then setting the `.target` property on the resulting object.

Make sure to properly translate such menu nodes into the internal menu
JSON representation.

Fixes: #6090
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-lua-runtime: also search luci.dispatcher scope when looking up values</title>
<updated>2022-11-09T19:37:54Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-11-09T19:37:54Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=fd7427c4e50564c2428377259f988df4ed785733'/>
<id>urn:sha1:fd7427c4e50564c2428377259f988df4ed785733</id>
<content type='text'>
Some legacy templates access dispatcher functions such as `build_url()`
without explicit scope, which worked in the old runtime since the template
view namespace was instantiated from the dispatcher.

Ensure that this continues to function in the emulated runtime.

Fixes: #6082
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
</feed>
