Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parameters in Safari on macOS and iOS #26

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions wifimgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,13 @@ def start(port=80):
except OSError:
pass

# Handle form data from Safari on macOS and iOS; it sends \r\n\r\nssid=<ssid>&password=<password>
try:
request += client.recv(512)
print("Received form data after \\r\\n\\r\\n(i.e. from Safari on macOS or iOS)")
except OSError:
pass

print("Request is: {}".format(request))
if "HTTP" not in request: # skip invalid requests
continue
Expand Down