Merge pull request #53 from adn77/master

Adapted changed CSRF handling
This commit is contained in:
Alex 2019-06-18 21:02:46 +02:00 committed by GitHub
commit 3df23befea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -39,6 +39,7 @@
# 2019-02-03: v0.11a fixed string escape for automation and speak commands
# 2019-02-10: v0.12 added "-d ALL" to the plain version, lastalexa now checks for SUCCESS activityStatus
# 2019-02-14: v0.12a reduced the number of replaced characters for TTS and automation
# 2019-06-18: v0.12c fixed CSRF
#
###
#
@ -425,7 +426,8 @@ fi
#
${CURL} ${OPTS} -s -c ${COOKIE} -b ${COOKIE} -A "${BROWSER}" -H "DNT: 1" -H "Connection: keep-alive" -L\
-H "Referer: https://alexa.${AMAZON}/spa/index.html" -H "Origin: https://alexa.${AMAZON}"\
https://${ALEXA}/api/language > /dev/null
https://${ALEXA}/templates/oobe/d-device-pick.handlebars > /dev/null
# https://${ALEXA}/api/language > /dev/null
rm -f "${TMP}/.alexa.login"
rm -f "${TMP}/.alexa.header"

View File

@ -3,7 +3,7 @@
# Amazon Alexa Remote Control (PLAIN shell)
# alex(at)loetzimmer.de
#
# 2019-02-14: v0.12a (for updates see http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html)
# 2019-02-14: v0.12c (for updates see http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html)
#
###
#
@ -371,7 +371,8 @@ fi
#
${CURL} ${OPTS} -s -c ${COOKIE} -b ${COOKIE} -A "${BROWSER}" -H "DNT: 1" -H "Connection: keep-alive" -L\
-H "Referer: https://alexa.${AMAZON}/spa/index.html" -H "Origin: https://alexa.${AMAZON}"\
https://${ALEXA}/api/language > /dev/null
https://${ALEXA}/templates/oobe/d-device-pick.handlebars > /dev/null
# https://${ALEXA}/api/language > /dev/null
rm -f "${TMP}/.alexa.login"
rm -f "${TMP}/.alexa.header"