|
|
sfeed_update: disallow using a directory as a config file - sfeed - RSS and Atom parser |
|
|
 |
git clone git://git.codemadness.org/sfeed (git://git.codemadness.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
README |
|
|
 |
LICENSE |
|
|
|
--- |
|
|
 |
commit 9754fe74f7b5c0600cc41eef8c6f5c8305a74a18 |
|
|
 |
parent 7526bd914c314dd86cc7386bbfaf55ad0d130130 |
|
|
 |
Author: Hiltjo Posthuma <hiltjo@codemadness.org> (mailto://) |
application/vnd.lotus-organizer |
|
|
Date: Tue, 26 Dec 2023 15:17:17 +0100 |
|
|
|
|
|
|
|
sfeed_update: disallow using a directory as a config file |
|
|
|
|
|
|
|
Tested on NetBSD 5.1: evaluating directories as config files could allow |
|
|
|
garbage, so disallow it. |
|
|
|
|
|
|
|
Devices / fifo, etc are still allowed. |
|
|
|
|
|
|
|
Diffstat: |
|
|
|
M sfeed_update | 2 +- |
|
|
|
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-) |
|
|
|
--- |
|
|
 |
diff --git 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}" ]; then |
|
|
|
+ if [ -r "${configpath}" ] && [ ! -d "${configpath}" ]; then |
|
|
|
. "${configpath}" |
|
|
|
else |
|
|
|
printf "Configuration file \"%s\" cannot be read.\n" "${config}" >&2 |
|