Commit 60f0923d authored by Vojtech Myslivec's avatar Vojtech Myslivec 🚀

Avoid unsafe pipe in challenge_response_file

parent 47717542
......@@ -208,6 +208,13 @@ cached_atsha_serial() {
cached_atsha_challenge_response_file() {
local file="$1"
# this is wierd atsha204cmd interface...
echo "$file" | cached_command file "$file" 'atsha204cmd' 'file-challenge-response'
# this is wierd atsha204cmd interface and I need to avoid unsafe pipe in
# busybox shell
local filename=$(cache_mktemp)
echo "$file" > "$filename"
cached_command file "$file" 'atsha204cmd' 'file-challenge-response' < "$filename"
rm "$filename"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment