mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 05:30:26 +00:00
build-ui.sh: use kube::util::ensure-temp-dir instead of static path.
Using static paths for temporary files has been a security problem in the past. Use kube::util::ensure-temp-dir to create a safe temporary directory and place the temporary file there.
This commit is contained in:
@@ -30,7 +30,8 @@ if ! which go-bindata > /dev/null 2>&1 ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
readonly TMP_DATAFILE="/tmp/datafile.go"
|
kube::util::ensure-temp-dir
|
||||||
|
readonly TMP_DATAFILE="${KUBE_TEMP}/datafile.go"
|
||||||
readonly SWAGGER_SRC="third_party/swagger-ui/..."
|
readonly SWAGGER_SRC="third_party/swagger-ui/..."
|
||||||
readonly SWAGGER_PKG="swagger"
|
readonly SWAGGER_PKG="swagger"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user