Closed Bug 721129 Opened 12 years ago Closed 12 years ago

Incorrect BigInteger comparison in JPakeCrypto

Categories

(Firefox for Android Graveyard :: Android Sync, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox11 fixed)

RESOLVED FIXED
Tracking Status
firefox11 --- fixed

People

(Reporter: dchanm+bugzilla, Assigned: rnewman)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

JPakeCrypto.java [1]
141     if (jp.gx4 == BigInteger.ONE) {
142       throw new Gx4IsOneException();
143     }

The above comparison will fail do to reference checking. jp.gx4 is assigned in JPakeClient.java [2] with new BigInteger(String) .

[1] - https://github.com/mozilla-services/android-sync/blob/develop/src/main/java/org/mozilla/gecko/sync/jpake/JPakeCrypto.java#L141
[2] - https://github.com/mozilla-services/android-sync/blob/develop/src/main/java/org/mozilla/gecko/sync/jpake/JPakeClient.java#L354
Fix and test. Should be a rubberstamp…! :D
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
Attachment #591580 - Flags: review?(dchan+bugzilla)
Blocks: 720933
Comment on attachment 591580 [details] [diff] [review]
Proposed patch. v1

Review of attachment 591580 [details] [diff] [review]:
-----------------------------------------------------------------

Hurrah! Patch with a test.
Attachment #591580 - Flags: review?(dchan+bugzilla) → review+
Fixed in develop:

https://github.com/mozilla-services/android-sync/commit/d0e6cc458bf4551177a4d3dce2e424321893cfda

Thanks for the quick review!
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Richard, please request aurora approval
(In reply to Brad Lassey [:blassey] from comment #4)
> Richard, please request aurora approval

Already merged as part of Bug 720933.
Whiteboard: [qa-]
Blocks: 723230
Product: Mozilla Services → Android Background Services
Product: Android Background Services → Firefox for Android
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: