Opened 8 months ago

Closed 7 months ago

#29068 closed defect (fixed)

shellcheck: zero_length_keys.sh issues

Reported by: rl1987 Owned by:
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: technical-debt
Cc: Actual Points:
Parent ID: Points:
Reviewer: nickm Sponsor:

Description

In zero_length_keys.sh line 22:
if [ $# -eq 0 ] || [ ! -f ${1} ] || [ ! -x ${1} ]; then
                          ^-- SC2086: Double quote to prevent globbing and word splitting.
                                           ^-- SC2086: Double quote to prevent globbing and word splitting.


In zero_length_keys.sh line 34:
DATA_DIR=`mktemp -d -t tor_zero_length_keys.XXXXXX`
         ^-- SC2006: Use $(..) instead of legacy `..`.


In zero_length_keys.sh line 43:
trap "rm -rf '$DATA_DIR'" 0
              ^-- SC2064: Use single quotes, otherwise this expands now rather than when signalled.

Child Tickets

Change History (5)

comment:1 Changed 8 months ago by rl1987

Status: newneeds_review

comment:2 Changed 8 months ago by nickm

Milestone: Tor: 0.4.1.x-final

comment:3 Changed 7 months ago by dgoulet

Reviewer: nickm

comment:4 Changed 7 months ago by nickm

Status: needs_reviewmerge_ready

This looks good to me. I didn't know that trap worked that way!

comment:5 Changed 7 months ago by dgoulet

Resolution: fixed
Status: merge_readyclosed

Merged in master. Thanks!

Note: See TracTickets for help on using tickets.