tayfunulu / WiFiManager

WiFi manager for ESP8266 - ESP12 - ESP32 - micropython
MIT License
345 stars 104 forks source link

%-escaped characters in password #8

Open DerFlob opened 6 years ago

DerFlob commented 6 years ago

%-escaped characters are not properly decoded. You added some replace-statements to "decode" exclamation and question marks. Unfortunately, my password includes a square bracket which won't be decoded and it fails to connect to the wifi.

I tried to integrate the unquote function from the urllib.parse module of the micropython/micropython-lib repo, though couldn't get it to work on an ESP8266 due to memory allocation issues.

Still I think it would be good to find a more general mechanism to decode %-escaped characters.

ThomasWaldmann commented 6 years ago

guess we could save us a lot of troubles by just putting everything we need to persist into 1 data structure and then just pickle it. it's not human readable as it is now, but we save all the encoding/decoding troubles.

note: using json is no solution as it can not represent arbitrary bytestrings (and we need that).