summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2023-12-28 16:48:06 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2023-12-28 16:48:06 +0100
commit03a0a0ddb450f33e59a911a8be1b17d31507fa43 (patch)
treea3d4c6392a6d47b4f60b2f2dcfa1b29845352247
parent0a5e36032373b34558e62f309be0b0ef7e925459 (diff)
sfeed_opml_export: disallow using a directory as a config file
Same as the commit 9754fe74f7b5c0600cc41eef8c6f5c8305a74a18 for sfeed_update Tested on NetBSD 5.1: evaluating directories as config files could allow garbage, so disallow it. Devices / fifo, etc are still allowed.
-rwxr-xr-xsfeed_opml_export2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfeed_opml_export b/sfeed_opml_export
index 6420d5e..9e769f7 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}" ]; then
+ if [ -r "${configpath}" ] && [ ! -d "${configpath}" ]; then
. "${configpath}"
else
printf "Configuration file \"%s\" cannot be read.\n" "${config}" >&2