Merge pull request #3783 from esphome/bump-2022.8.3

2022.8.3
This commit is contained in:
Jesse Hills 2022-09-06 18:54:28 +12:00 committed by GitHub
commit 041eb8f6cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,6 @@
"""Constants used by esphome.""" """Constants used by esphome."""
__version__ = "2022.8.2" __version__ = "2022.8.3"
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"

View File

@ -816,14 +816,17 @@ class LoginHandler(BaseHandler):
import requests import requests
headers = { headers = {
"Authentication": f"Bearer {os.getenv('SUPERVISOR_TOKEN')}", "X-Supervisor-Token": os.getenv("SUPERVISOR_TOKEN"),
} }
data = { data = {
"username": self.get_argument("username", ""), "username": self.get_argument("username", ""),
"password": self.get_argument("password", ""), "password": self.get_argument("password", ""),
} }
try: try:
req = requests.post("http://supervisor/auth", headers=headers, data=data) req = requests.post(
"http://supervisor/auth", headers=headers, json=data, timeout=30
)
if req.status_code == 200: if req.status_code == 200:
self.set_secure_cookie("authenticated", cookie_authenticated_yes) self.set_secure_cookie("authenticated", cookie_authenticated_yes)
self.redirect("/") self.redirect("/")