From 20da43e583a6d81d7403b6c4d6c40e37e9d40ad6 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 21 Nov 2016 15:32:30 +0100 Subject: secret files: Don't allow them to be symlinks. --- bin/impressive-display | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/impressive-display b/bin/impressive-display index c8966ef..5276354 100755 --- a/bin/impressive-display +++ b/bin/impressive-display @@ -319,10 +319,10 @@ function download_pdffile { fi DOWNLOADED_FILE="$workdir/$(basename $PDF_URI)" - if [ -e "$workdir/secrets/default.secret" ]; then + if [ -f "$workdir/secrets/default.secret" ]; then NETRCFILE=" --netrc-file $workdir/secrets/default.secret" fi - if [ -e "$workdir/secrets/$THIS_HOSTNAME.secret" ]; then + if [ -f "$workdir/secrets/$THIS_HOSTNAME.secret" ]; then NETRCFILE=" --netrc-file $workdir/secrets/${THIS_HOSTNAME}.secret" fi if ! curl $NETRCFILE "$PDF_URI" 1> "$DOWNLOADED_FILE"; then -- cgit v1.2.3