summaryrefslogtreecommitdiffstats
path: root/fb.in
diff options
context:
space:
mode:
authorMoritz Wilhelmy <moritz+git@wzff.de>2012-01-24 21:24:49 +0100
committerMoritz Wilhelmy <moritz+git@wzff.de>2012-01-24 21:24:49 +0100
commit400edb7fc13a5b3aa12040c82504b175c7f0982e (patch)
tree0affebf133e8a438f84fb6837be8e76a81ec84ff /fb.in
parent16e05431a3eb9c5546e2a031956178ce82db1539 (diff)
properly quote all uses of $STAT.
Diffstat (limited to 'fb.in')
-rw-r--r--fb.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/fb.in b/fb.in
index 1f62ea4..4c1eacf 100644
--- a/fb.in
+++ b/fb.in
@@ -64,16 +64,16 @@ do_upload() {
EXTRA="-F extension=$EXTENSION"
fi
TMPFILE=`mktemp "$TMPDIR/data.XXXXXX"`
- if [ `$STAT -- "$file"` -gt "$WARNSIZE" ]; then
+ if [ "`$STAT -- "$file"`" -gt "$WARNSIZE" ]; then
WARNSIZE=`curl -s "$PASTEBIN/file/get_max_size"`
- if [ `$STAT -- "$file"` -gt "$WARNSIZE" ]; then
+ if [ "`$STAT -- "$file"`" -gt "$WARNSIZE" ]; then
echo "Warning: Your upload is too big and would be rejected. Maximum size is: $WARNSIZE bytes. Skipping..." >&2
EXITCODE=1
return 1
fi
fi
CURLOPTS="-# -n -L -A $USERAGENT $EXTRA"
- if [ `$STAT -- "$file"` -eq "0" ] || echo "$file" | grep -F -q ","; then
+ if [ "`$STAT -- "$file"`" -eq "0" ] || echo "$file" | grep -F -q ","; then
basefilename=`echo "$basefilename" | tr -d ,`
if ! curl $CURLOPTS -F "file=@-;filename=$basefilename" "$PASTEBIN/file/do_upload" < "$file" > $TMPFILE; then
EXITCODE=1