Hi all
I'm having some issues with the newly minted Homepage widget for OpenWRT.
The widget makes a call to network.device via ubus to get some information to display, however without fail (even when using the root user via a CURL command), the response is Access Denied.
CURL (note I have also tried specifying the interface as well but based on outuput from ubus in the cli it should just give all of the interfaces if that's not specified?):
curl -H 'Content-Type: application/json' -d '{ "jsonrpc": "2.0", "id": 1, "method": "call", "params": ["0b33ddba75282a7a4ceb23d932ebef48", "network.device", "status", {}] }' http://192.168.1.1/ubus | jq
Output:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32002,
"message": "Access denied"
}
}
And with the same login session, other calls work fine:
curl -H 'Content-Type: application/json' -d '{ "jsonrpc": "2.0", "id": 1, "method": "call", "params": ["0b33ddba75282a7a4ceb23d932ebef48", "system", "info", {}] }' http://192.168.1.1/ubus | jq
Output:
{
"jsonrpc": "2.0",
"id": 1,
"result": [
0,
{
"localtime": 1709074097,
"uptime": 1145305,
"load": [
2784,
1984,
32
],
"memory": {
"total": 8122626048,
"free": 7088615424,
"shared": 470683648,
"buffered": 3534848,
"available": 7162826752,
"cached": 631521280
},
"root": {
"total": 241066028,
"free": 240846496,
"used": 219532,
"avail": 240830112
},
"tmp": {
"total": 3966124,
"free": 3506640,
"used": 459484,
"avail": 3506640
},
"swap": {
"total": 0,
"free": 0
}
}
]
}
I can't find anywhere in the documentation which says that network.device access is restricted by more than just the basic ACL, or needs to be opened up - but does anyone have any information about that they can share?
The thread for this issue with the widget itself is here: https://github.com/gethomepage/homepage/discussions/3012#discussioncomment-8606568