The function below builds a file path by concatenating a base directory with user-supplied input.
The bug: an attacker can pass "../../../etc/passwd" as the filename and read any file on the server — a classic path traversal (directory traversal) attack.
Your task: fix solve(basePath, userInput) so that:
basePath returns null.require('path') available in this sandbox).solve('/uploads', 'photo.jpg') // → '/uploads/photo.jpg'
solve('/uploads', 'sub/image.png') // → '/uploads/sub/image.png'
solve('/uploads', '../etc/passwd') // → null
solve('/uploads', '../../secret.key') // → nullSample tests