Introduction
Introduction Statistics Contact Development Disclaimer Help
sfeed_update: leave IFS unchanged for sfeedrc code - sfeed - RSS and Atom parser
git clone git://git.codemadness.org/sfeed
Log
Files
Refs
README
LICENSE
---
commit 6dcce9a9e8e720aca89cf50e5f5def3ea9d57ca2
parent 195cbb7aa51b7726c9a3cc0f5bcd5e34968a2907
Author: Jeff Huffman <[email protected]>
Date: Fri, 6 Dec 2024 12:53:59 +0100
sfeed_update: leave IFS unchanged for sfeedrc code
IFS affects the word-splitting of unquoted variable expansions, which can cause
bugs that are very difficult to track down without in-depth shell knowledge.
Example of affected code:
prog ${var:+--opt "$var"}
Diffstat:
M sfeed_update | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/sfeed_update b/sfeed_update
@@ -239,10 +239,9 @@ main() {
# process a single feed.
# parameters are: config, tmpdir, name, feedurl, basesiteurl, encoding
if [ "${SFEED_UPDATE_CHILD}" = "1" ]; then
- IFS="" # "\037"
[ "$1" = "" ] && exit 0 # must have an argument set
printf '%s\n' "$1" | \
- while read -r _config _tmpdir _name _feedurl _basesiteurl _encoding; do
+ while IFS="" read -r _config _tmpdir _name _feedurl _basesiteurl _enc…
loadconfig "${_config}"
sfeedtmpdir="${_tmpdir}"
_feed "${_name}" "${_feedurl}" "${_basesiteurl}" "${_encoding}"
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.