Intent-Code Divergence
Medium
- Confidence
- 97% confidence
- Finding
- The restore path validation is inconsistent with how restoreBackup() actually works: it copies the selected backup into CONFIG.tempDir and then passes that temp path into copyFromBackup(), but copyFromBackup() only allows paths under CONFIG.backupDir. As a result, restore operations fail by design, which can leave users unable to recover after a bad hosts update. In a tool that modifies /etc/hosts with elevated privileges, broken rollback materially increases operational risk.
