diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-12-29 13:50:55 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-12-29 13:50:55 +0100 |
commit | cbf92f526528fc995e309d2f13b7dcebfd1e5c75 (patch) | |
tree | 0043af19c350ac3a0998f4635d942d9bfd26bf32 | |
parent | 03a0a0ddb450f33e59a911a8be1b17d31507fa43 (diff) |
sfeed_update/sfeed_opml_export: only allow regular files
Be more strict and only allow regular files. It makes no sense to use device
files or fifos with sfeed_update and it can cause issues, because sfeed_update
expects to read the config file for each (child) invocation also.
-rwxr-xr-x | sfeed_opml_export | 2 | ||||
-rwxr-xr-x | sfeed_update | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sfeed_opml_export b/sfeed_opml_export index 9e769f7..f949488 100755 --- a/sfeed_opml_export +++ b/sfeed_opml_export @@ -15,7 +15,7 @@ loadconfig() { fi # config is loaded here to be able to override $sfeedpath or functions. - if [ -r "${configpath}" ] && [ ! -d "${configpath}" ]; then + if [ -r "${configpath}" ] && [ -f "${configpath}" ]; then . "${configpath}" else printf "Configuration file \"%s\" cannot be read.\n" "${config}" >&2 diff --git a/sfeed_update b/sfeed_update index 607c048..1f797f8 100755 --- a/sfeed_update +++ b/sfeed_update @@ -24,7 +24,7 @@ loadconfig() { fi # config is loaded here to be able to override $sfeedpath or functions. - if [ -r "${configpath}" ] && [ ! -d "${configpath}" ]; then + if [ -r "${configpath}" ] && [ -f "${configpath}" ]; then . "${configpath}" else printf "Configuration file \"%s\" cannot be read.\n" "${config}" >&2 |