diff options
author | Moritz Wilhelmy <moritz+git@wzff.de> | 2012-01-24 21:24:49 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-03-14 00:19:50 +0100 |
commit | b5b33a50fcb3a5e19751a38ad7b3cc71dfcdbfaf (patch) | |
tree | 4a054dae57de0428cf075828287545ad58eeee1d /fb.in | |
parent | 72350301482cf2c76bb9f2529f3f99b7a28d1931 (diff) |
properly quote all uses of $STAT.v1.0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb.in')
-rw-r--r-- | fb.in | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -68,7 +68,7 @@ request_helper() { if [ "$mode" = "u" ]; then basefilename=`basename -- "$file"` - if [ `$STAT -- "$file"` -eq "0" ] || echo "$basefilename" | grep -F -q ","; then + if [ "`$STAT -- "$file"`" -eq "0" ] || echo "$basefilename" | grep -F -q ","; then base64fn="`base64_encode "$basefilename"`" curl $CURLOPTS -F "file=@-" -F "filename=$base64fn" "$url" < "$file" -o /dev/stdout else @@ -143,9 +143,9 @@ do_upload() { fi TMPFILE=`mktemp "$TMPDIR/data.XXXXXX"` - if [ `$STAT -- "$file"` -gt "$WARNSIZE" ]; then + if [ "`$STAT -- "$file"`" -gt "$WARNSIZE" ]; then WARNSIZE=`request_helper d "$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 return 1 fi |