Merge remote-tracking branch 'origin/pr/266'
* origin/pr/266: Only allow known-safe characters in socket paths
This commit is contained in:
commit
5ddc118429
@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash --
|
#!/bin/bash --
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
umask 0077
|
||||||
tmpdir="$(mktemp -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
|
|
||||||
if [[ $tmpdir =~ \" ]]; then
|
if ! [[ $tmpdir =~ ^/[/A-Za-z0-9._-]+$ ]]; then
|
||||||
echo 'Error: non admissible character detected in sock path.'
|
echo 'Error: non admissible character detected in sock path.'>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user