check macaroonfilepath is rooted

This commit is contained in:
nicolas.dorier
2018-07-10 12:51:23 +09:00
parent 310a9a6d59
commit c9c2730409

View File

@@ -109,6 +109,11 @@ namespace BTCPayServer.Controllers
ModelState.AddModelError(nameof(vm.ConnectionString), "The macaroonfilepath file does exist");
return View(vm);
}
if(!System.IO.Path.IsPathRooted(connectionString.MacaroonFilePath))
{
ModelState.AddModelError(nameof(vm.ConnectionString), "The macaroonfilepath should be fully rooted");
return View(vm);
}
}
if (isInternalNode && !CanUseInternalLightning())