nine/resource: fix/sanitize user data handling