Closed Bug 817909 Opened 13 years ago Closed 13 years ago

[Settings-Phone Lock] "confirm passcode" field accepts invalid entries, if you previously typed correct value and then backspaced some of it

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:-)

RESOLVED FIXED
blocking-basecamp -

People

(Reporter: dholbert, Assigned: neeraj_kumar)

Details

(Keywords: b2g-testdriver, unagi)

Attachments

(1 file, 1 obsolete file)

This is sort of an edge case, but it's definitely broken, so I figured it'd be worth filing. STR: 1. In Settings | Phone Lock, toggle "passcode lock" to on. (Or, if you already have a passcode, hit "change passcode" and type in your current code to get to the "Create a passcode" screen) 2. Type "1 1 1 1" into the "Passcode" boxes 3. Type "1 1 1 1" into the "Confirm passcode" boxes. (but DON'T hit "create" yet) 4. Now hit backspace 4 times to clear the "Confirm Passcode" boxes. If you like, type in one or two numbers, to partially-fill-in the "Confirm" boxes with something invalid. 5. Hit "Create" EXPECTED RESULTS: Passcode should be rejected, since the Passcode & Confirm Passcode fields don't match. ACTUAL RESULTS: Passcode is accepted
I'm running the latest stable dogfood B2G release -- build ID 20121127132302
blocking-basecamp: ? → -
Hi, I have fixed this issue and wanted to cotribute this fix.
I have submitted the fix using "Pull Request" on Github. Please let me know if this works.
Attached patch Patch for this bug. (obsolete) — — Splinter Review
Here is pull request id : https://github.com/mozilla-b2g/gaia/issues/9635. Please do the review.
Flags: sec-review?
Flags: sec-review? → sec-review?(ptheriault)
Neeraj: You need to ask for review from someone who's worked on the code in question. From the "blame" link for this file on github, it looks like Alive or Evelyn might be good people to flag for review. CC'ing them here.
Flags: needinfo?(alive)
(Also: Generally, gaia pull requests tend to be limited to one bugfix per pull-request -- and then we hackily (ab)use Bugzilla's attachment-review-request system by attaching an HTML file linking to the pull request as your "patch" on the bug page, and then you can request review on that file in bugzilla. I'm not sure how mandatory that process is; Alive or Evelyn can comment more.) (Also: thanks for the patches! sorry for not having said that already :))
Hi, Could you provide another pull request? The one in comment 5 is not updated. (And you had closed it)
Flags: needinfo?(alive)
Thanks Daniel and Alive for your support! I have reopened the pull request. Please do the review. (Thanks).
Point to new pull request : https://github.com/mozilla-b2g/gaia/pull/9905 Hello Alive, Thanks for your support! :) Please help me by reviewing this new pull request. Regards,
Attachment #746861 - Attachment is obsolete: true
Attachment #752140 - Flags: review?(alive)
[Canceling sec-review request -- pretty sure Neeraj just toggled that thinking it was the code-review mechanism, in comment 5.]
Flags: sec-review?(ptheriault)
Thanks Daniel for correcting me :)
Comment on attachment 752140 [details] [diff] [review] New fresh pull request for this bug. It's not clear to me why this fixes it. Could you please explain? Thank you and sorry for very late review response.
Hello Alive, Thanks for your review! :) Actully passcodeStatus is not being reset when user is backspacing some chars and its status is 'success'(which is actully set when valid 8 passcode chars are entered). Once user has entered valid 8 passcode chars, passcodeStatus status becomes 'success'. Since the passcodeStatus is still in 'success' status, user is able to create the passcode even if some chars are backspaced. So to solve this bug, we are resetting the passcodeStatus using hideErrorMessage() whenever user is backspacing passcode chars. We have also added 'success' case check to be in safer side. Hope this helps :) Regards,
(In reply to Neeraj from comment #14) > Hello Alive, > > Thanks for your review! :) > > Actully passcodeStatus is not being reset when user is backspacing some > chars and its status is 'success'(which is actully set when valid 8 passcode > chars are entered). Once user has entered valid 8 passcode chars, > passcodeStatus status becomes 'success'. Since the passcodeStatus is still > in 'success' status, user is able to create the passcode even if some chars > are backspaced. > > So to solve this bug, we are resetting the passcodeStatus using > hideErrorMessage() whenever user is backspacing passcode chars. We have also > added 'success' case check to be in safer side. > > Hope this helps :) > > Regards, Makes sense, but let's have another function named for 'resetPasscodeStatus()', do the same thing as 'hideErrorMessage()' and use it here, because this looks more semantic.
Comment on attachment 752140 [details] [diff] [review] New fresh pull request for this bug. To make the code more readable, see comment 15. Please request review again, thank your for your patience.
Attachment #752140 - Flags: review?(alive)
Attachment #752140 - Flags: review?(alive)
(In reply to Alive Kuo [:alive] from comment #16) > Comment on attachment 752140 [details] [diff] [review] > New fresh pull request for this bug. > > To make the code more readable, see comment 15. > Please request review again, thank your for your patience. Hello Alive, Thanks for the review and sorry for the delayed response! :) I have updated the pull request and squashed all the commits to single. Please review it again :) Regards,
Comment on attachment 752140 [details] [diff] [review] New fresh pull request for this bug. r=me
Attachment #752140 - Flags: review?(alive) → review+
Assignee: nobody → neeraj_kumar
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: