mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #903 from YunoHost/fix-curl-readability
Fix possible security issue with these cookie files
This commit is contained in:
commit
3d0bd9f32c
1 changed files with 6 additions and 1 deletions
|
@ -237,9 +237,14 @@ ynh_local_curl () {
|
||||||
|
|
||||||
# Wait untils nginx has fully reloaded (avoid curl fail with http2)
|
# Wait untils nginx has fully reloaded (avoid curl fail with http2)
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
|
local cookiefile=/tmp/ynh-$app-cookie.txt
|
||||||
|
touch $cookiefile
|
||||||
|
chown root $cookiefile
|
||||||
|
chmod 700 $cookiefile
|
||||||
|
|
||||||
# Curl the URL
|
# Curl the URL
|
||||||
curl --silent --show-error -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 $POST_data "$full_page_url" --cookie-jar /tmp/ynh-$app-cookie.txt --cookie /tmp/ynh-$app-cookie.txt
|
curl --silent --show-error -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 $POST_data "$full_page_url" --cookie-jar $cookiefile --cookie $cookiefile
|
||||||
}
|
}
|
||||||
|
|
||||||
# Render templates with Jinja2
|
# Render templates with Jinja2
|
||||||
|
|
Loading…
Add table
Reference in a new issue