Closed Bug 1252459 Opened 4 years ago Closed 4 years ago

identity is undefined error in PeerConnectionIdp.jsm

Categories

(Core :: WebRTC: Networking, defect, P1)

44 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: kevin.corre, Assigned: kevin.corre)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160210153822

Steps to reproduce:

During the validation of an WebRTC identity assertion, throwing an error because the identity name does not correspond to the idp domain. 
For instance with the following parameters

RTCIdentityProviderDetails.domain = "localhost:8080"
RTCIdentityValidationResult.identity = "bob@idp.com"

idp.com and localhost does not match, so PeerConnectionIdP.jsm throws an error (ok). However, the code throwing the error is itself buggy.


Actual results:

Firefox throws an TypeError: identity is undefined
at PeerConnectionIdP.jsm line 180


Expected results:

line 180 and 181 are :
     error('name "' + identity.name +
            '" doesn\'t match IdP: "' + this.provider + '"');

'identity' is undefined in this scope and 'name' should be used instead as it is used in the rest of the function.
Attachment #8725267 - Flags: review?(martin.thomson)
Component: Untriaged → WebRTC: Networking
Product: Firefox → Core
Attachment #8725267 - Flags: review?(martin.thomson) → review+
Attachment #8725483 - Flags: review?(martin.thomson) → review+
Comment on attachment 8725483 [details]
MozReview Request: Bug 1252459 - Replaced 'identity.name' by 'name' to fix identity undefined bug, r=mt

https://reviewboard.mozilla.org/r/37505/#review34029
Assignee: nobody → kevin.corre
Rank: 15
Priority: -- → P1
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hi Kevin -- Are you ready to land?  Do you need any help landing?
Flags: needinfo?(kevin.corre)
I landed the change just now.  I've been meaning to, but bug 1254336 got in the way.
Flags: needinfo?(kevin.corre)
https://hg.mozilla.org/mozilla-central/rev/a901636216df
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.