bparmentier / WiFiKeyShare

Share Wi-Fi passwords with QR codes or NFC tags
https://wifikeysha.re
GNU General Public License v3.0
118 stars 40 forks source link

Wi-Fi networks with special characters in SSID/key produce an invalid QR code #39

Closed bparmentier closed 5 years ago

bparmentier commented 5 years ago

As described in https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11, a Wi-Fi network with the literal SSID "foo;bar\baz" is recognized as "foo in the QR code.

The final string should be something like WIFI:T:nopass;S:\"foo\;bar\\baz\";; but instead gives WIFI:T:nopass;S:"foo;bar\baz";;.

The code to improve is in app/src/main/java/be/brunoparmentier/wifikeyshare/utils/QrCodeUtils.java.