Repocop reports by srpm

  rpm id test status message
newsboat-2.21-alt1.x86_64 unsafe-tmp-usage-in-scripts fail The test discovered scripts with errors which may be used by a user for damaging important system files. For example if a script uses in its work a temp file which is created in /tmp directory, then every user can create symlinks with the same name (pattern) in this directory in order to destroy or rewrite some system or another user's files. Scripts _must_ _use_ mktemp/tempfile or must use $TMPDIR. mktemp/tempfile is safest. $TMPDIR is safer than /tmp/ because libpam-tmpdir creates a subdirectory of /tmp that is only accessible by that user, and then sets TMPDIR and other variables to that. Hence, it doesn't matter nearly as much if you create a non-random filename, because nobody but you can access it. Found error in /usr/share/doc/newsboat/contrib/ $ grep -A5 -B5 /tmp/ /usr/share/doc/newsboat/contrib/ # shamelessy copy this from contrib/bookmark-pinboard TMP_TOKEN=`echo $output | sed 's/^.*\"code\":"\([^"]*\)".*$/\1/'` # redirect user to pocket authentication page AUTH_URL="$TMP_TOKEN&redirect_uri=" echo $TMP_TOKEN> /tmp/pocket_token echo "please navigate to $AUTH_URL, active the access. Then press enter" xdg-open $AUTH_URL read dontcare output=`wget --post-data "consumer_key=$APPLICATION_CONSUMER_KEY&code=$TMP_TOKEN" -O - 2>/dev/null` echo $output > /tmp/input output=`echo $output | sed 's/^.*access_token=\([^&"]*\).*$/\1/'` echo $output > ~/.pocket_access_token

generated by repocop at Mon Oct 19 04:21:38 2020