pidusage
pidusage copied to clipboard
uptime raises unhandled exception if current user has not sufficient privileges with node.js 16.18.0 and newer
API Platform version(s) affected: x.y.z Windows 10, node.js 16.18.0 and newer
Description
uptime raises unhandled exception, so the implemented fallback soultion in wmic.js does not work anymore:
// Fallback on current date when uptime is not allowed (see https://github.com/soyuka/pidusage/pull/130)
const uptime = Math.floor(os.uptime() || (date / 1000))
In older versions of node.js no exception was thrown by os.uptime.
How to reproduce
Try to get uv_uptime with an unpriviledged user
Possible Solution
Additional Context