Closed Bug 898293 Opened 11 years ago Closed 11 years ago

[Buri][WIFI]It cannot save network when you input more characters

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect, P5)

defect

Tracking

(blocking-b2g:-)

RESOLVED FIXED
blocking-b2g -

People

(Reporter: sync-1, Assigned: chucklee)

Details

Attachments

(3 files)

AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.019.164 Firefox os v1.1 Mozilla build ID:20130715070218 Created an attachment (id=469942) PIC DEFECT DESCRIPTION: It cannot save network when you input more characters REPRODUCING PROCEDURES: 1.settings->wifi->manage network->join hidden network 2.input more characters in SSID name,security choose open 3.tap "ok",but cannot find it under known network->KO EXPECTED BEHAVIOUR: it should saved normal ASSOCIATE SPECIFICATION: TEST PLAN REFERENCE: TOOLS AND PLATFORMS USED: USER IMPACT:MID REPRODUCING RATE:5/5 For FT PR, Please list reference mobile's behavior:
Clone from brother
Attached image PIC
Clone from brother
Attached file logcat
SSID can't be longer than 32 bytes, the input SSID is too long and cause an error in wpa_supplicant: 07-25 11:14:58.470 E/wpa_supplicant( 1347): Line 0: too long ssid (len=185 max_len=32) Now we don't have an event to inform that, but this can be limited directly by Gaia. Note that non-ASCII chars will be encoded into UTF8, and make the actual length of SSID longer than ssid.length. I don't know if Gaia can calculate the encoded UTF-8 length of a string. On the other hand, I think this is a case that nearly impossible to happen in normal use. So it should be low priority.
Severity: normal → trivial
Flags: needinfo?(arthur.chen)
Priority: P1 → P5
We should do the check from Gaia as we check the validity of the password.
Flags: needinfo?(arthur.chen)
Change component per comment 6.
Component: Wifi → Gaia::Settings
Maybe you could add maxlength to limit user's input as password's input box do.
I think maxlength check might fail when containing non-ASCII chars in SSID. As I mentioned in comment 5, the length has to be calculated char-by-char. For example you typed '£' in SSID, its length is 1(char). But for SSID usage, its length is 2(bytes) because it has to be encoded by UTF-8, and result is 0xC2 0xA3.
Assignee: nobody → chulee
Attached file Pull Request
Limit length of SSID by length of UTF-8 encoded data.
Attachment #782986 - Flags: review?(arthur.chen)
Comment on attachment 782986 [details] Pull Request Thank you for taking care of this! r=me. Please address the comments in github before merging.
Attachment #782986 - Flags: review?(arthur.chen) → review+
(In reply to Arthur Chen [:arthurcc] from comment #11) > Comment on attachment 782986 [details] > Pull Request > > Thank you for taking care of this! r=me. Please address the comments in > github before merging. Done! Thanks~
There is still one line (628) over 80 character. Could you help fix it? Thanks!
Fixed, but I am not sure if I am using the right coding style.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
blocking-b2g: --- → leo?
Hi Arthur, could you add this patch in v1.1?
Flags: needinfo?(arthur.chen)
The patch will get uplifted after the bug becomes a leo+.
Flags: needinfo?(arthur.chen)
This is unfortunate behaviour. We discussed it in triage and decided that it wasn't worth blocking v1.1 for the following reasons: - only reproducible with hidden SSIDs - only reproducible if the user types in many characters for the SSID - not a regression from v1.0.1 - unclear that user can't just try other entries for the SSID Please feel free to re-nom if you disagree.
blocking-b2g: leo? → -
I would like to add another reason: This bug is rarely reproduced in real life usage - the SSID causes the problem never exists because it violates the 802.11 standard.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: