Skip to content

Commit

Permalink
Merge pull request #26 from ColinNg/fix-parameters-in-Safari-on-macOS…
Browse files Browse the repository at this point in the history
…-and-iOS

Fix parameters in Safari on macOS and iOS
  • Loading branch information
tayfunulu authored Dec 31, 2022
2 parents b86a900 + 8e92966 commit 92594fc
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 92594fc

Please sign in to comment.