Merge branch 'bug475' into 'main'

ConfigurationSources: Allow config files to be world-readable.

Closes #475

See merge request tpo/core/arti!528
This commit is contained in:
Ian Jackson 2022-05-25 14:23:12 +00:00
commit 4b0459d204
1 changed files with 6 additions and 1 deletions

View File

@ -159,7 +159,12 @@ where
for (path, must_read) in files {
let required = must_read == &MustRead::MustRead;
match mistrust.verifier().require_file().check(&path) {
match mistrust
.verifier()
.permit_readable()
.require_file()
.check(&path)
{
Ok(()) => {}
Err(fs_mistrust::Error::NotFound(_)) if !required => {}
Err(e) => return Err(ConfigError::Foreign(e.into())),