Skip to content

Commit c3d147b

Browse files
[STYLE] possible regression fix by using char-class (- WIP #485 -)
Changes in file .github/actions/check-control/action.yml: * minor refactor Changes in file .github/actions/run-minimal-acceptance-tests/action.yml: * minor refactor Changes in file .github/actions/setup-py-reqs/action.yml: * minor refactor
1 parent 731b792 commit c3d147b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/actions/check-control/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ runs:
115115
raw_input='${{ inputs.sha }}'
116116
117117
# Reject NUL or newline immediately
118-
if printf '%s' "$raw_input" | grep -q $'[\\x00\\n\\r]'; then
118+
if printf '%s' "$raw_input" | grep -q '[^[:print:]]'; then
119119
printf "::error title='Invalid':: %s\n" "Error: input contains disallowed control characters" >&2
120120
exit 1
121121
fi

.github/actions/run-minimal-acceptance-tests/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ runs:
8888
raw_input='${{ inputs.sha }}'
8989
9090
# Reject NUL or newline immediately
91-
if printf '%s' "$raw_input" | grep -q $'[\\x00\\n\\r]'; then
91+
if printf '%s' "$raw_input" | grep -q '[^[:print:]]'; then
9292
printf "::error title='Invalid':: %s\n" "Error: input contains disallowed control characters" >&2
9393
exit 1
9494
fi

.github/actions/setup-py-reqs/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ runs:
7373
raw_input='${{ inputs.sha }}'
7474
7575
# Reject NUL or newline immediately
76-
if printf '%s' "$raw_input" | grep -q $'[\\x00\\n\\r]'; then
76+
if printf '%s' "$raw_input" | grep -q '[^[:print:]]'; then
7777
printf "::error title='Invalid':: %s\n" "Error: input contains disallowed control characters" >&2
7878
exit 1
7979
fi

0 commit comments

Comments
 (0)