Closed Bug 819164 Opened 12 years ago Closed 12 years ago

Can't connect to network with SSID that includes UTF-8 encoded characters

Categories

(Firefox OS Graveyard :: Wifi, defect)

defect
Not set
normal

Tracking

(blocking-basecamp:+, firefox19 fixed, firefox20 fixed, b2g18 fixed)

RESOLVED FIXED
B2G C3 (12dec-1jan)
blocking-basecamp +
Tracking Status
firefox19 --- fixed
firefox20 --- fixed
b2g18 --- fixed

People

(Reporter: brendan, Assigned: mrbkap)

References

Details

Attachments

(2 files)

Here at the Hotel St. Regis, cbeard tried making a hotspot with his iPhone, which requires a password. In that case the B2G phone couldn't connect, I think. Chris should say more.

/be
Summary: Unagi couldn't connect to iPhone hotspot with password → Unagi couldn't connect to iPhone wifi hotspot with password
I'm not sure if anyone around has an iPhone that we can test on easily. I'll ask around.
blocking-basecamp: --- → ?
Blake, does the wpa supplicant support ad hoc?
blocking-basecamp: ? → +
We can't handle the ssid with special characters, for instance "Tim’s iPhone 4S". We got the javascript error when ssid has character `'`.
Embarrassing!
Summary: Unagi couldn't connect to iPhone wifi hotspot with password → Can't connect to network with SSID that includes single-quote character (and probably more)
More information, look like ssid is encoded in utf8. So `'` is represented in 0xe2 0x80 0x99.
Attached patch Proposed fixSplinter Review
The problem is that readString interprets the string as UTF-8, so reply_len was not a valid index into str. The fix is to fix up the string (do nul termination and newline-nuking) before we try to convert to utf-8. One nice thing about writing this in JS using ctypes: this was a misbehavior bug dealing with indices into arrays that's not a security vulnerability!

Thanks a ton for the debugging help, Vincent.
Attachment #691149 - Flags: review?(vchang)
Attachment #690776 - Attachment is patch: false
One problem I'm having right now is that the settings app is broken too badly to connect to any network (being tracked by bug 818056) so I can't verify that my patch fixes this (other than in my test, I stopped seeing us throw exceptions).
Summary: Can't connect to network with SSID that includes single-quote character (and probably more) → Can't connect to network with SSID that includes UTF-8 encoded characters
Attachment #691149 - Flags: review?(vchang) → review+
https://hg.mozilla.org/mozilla-central/rev/1afcff95d353
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 821158
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: