Allow the special `ubus_rpc_session` method call argument even if it is not
specified in the policy.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
}
/* named argument not found in policy */
- if (!found)
+ if (!found) {
+ /* allow special ubus_rpc_session argument */
+ if (!strcmp("ubus_rpc_session", (char *)hdr->name) && blob_id(attr) == BLOBMSG_TYPE_STRING)
+ continue;
+
goto inval;
+ }
}
*res = rpc_ucode_blob_array_to_ucv(&script->vm, blob_data(msg), blob_len(msg), true);