Skip to content

Commit

Permalink
Merge pull request #638 from softins/fix-version-report
Browse files Browse the repository at this point in the history
Prevent listing the complete file if version tag missing
  • Loading branch information
timkimber authored Feb 9, 2021
2 parents 8b79642 + a5512c0 commit bce73ad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions getssl
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@
# 2021-01-22 Add FTP_OPTIONS
# 2021-01-27 Add the ability to set several reload commands (atisne)
# 2021-01-29 Use dig -r (if supported) to ignore.digrc (#630)
# 2021-02-07 Allow -u --upgrade without any domain, so that one can only update the script
# 2021-02-07 Allow -u --upgrade without any domain, so that one can only update the script (2.34)
# 2021-02-09 Prevent listing the complete file if version tag missing (#637)
# ----------------------------------------------------------------------------------------

case :$SHELLOPTS: in
Expand Down Expand Up @@ -753,10 +754,10 @@ check_getssl_upgrade() { # check if a more recent version of code is available a
fi
if [[ ${_MUTE} -eq 0 ]]; then
echo "Updated getssl from v${VERSION} to v${latestversion}"
echo "these update notification can be turned off using the -Q option"
echo "These update notifications can be turned off using the -Q option"
echo ""
echo "Updates are;"
awk "/\(${VERSION}\)$/ {s=1} s; /\(${latestversion}\)$/ {s=0}" "$TEMP_UPGRADE_FILE" | awk '{if(NR>1)print}'
awk "/\(${VERSION}\)$/ {s=1} s; /\(${latestversion}\)$/ || /^# ----/ {s=0}" "$TEMP_UPGRADE_FILE" | awk '{if(NR>1)print}'
echo ""
fi
if [[ -n "$_KEEP_VERSIONS" ]] && [[ "$_KEEP_VERSIONS" =~ ^[0-9]+$ ]]; then
Expand Down Expand Up @@ -786,7 +787,7 @@ check_getssl_upgrade() { # check if a more recent version of code is available a
else
info ""
info "A more recent version (v${latestversion}) of getssl is available, please update"
info "the easiest way is to use the -u or --upgrade flag"
info "The easiest way is to use the -u or --upgrade flag"
info ""
fi
fi
Expand Down

0 comments on commit bce73ad

Please sign in to comment.