Issue #2354389 by eshta: Add data validation for paths.