Open Bug 1291645 Opened 8 years ago Updated 2 years ago

Update account's resource after binding to server-generated resource

Categories

(Chat Core :: XMPP, defect)

defect

Tracking

(Not tracked)

People

(Reporter: abdelrahman, Unassigned)

References

Details

Attachments

(1 file)

No description provided.
Please include a description when filing bug. From just the summary, I don't see why this is a bug.
Flags: needinfo?(ab)
(In reply to Florian Quèze [:florian] [:flo] from comment #1) > Please include a description when filing bug. From just the summary, I don't > see why this is a bug. OK After landing bug 955307, we bind account's resource to server-generated resource, but we don't update account's resource (https://dxr.mozilla.org/comm-central/source/chat/protocols/xmpp/xmpp-session.jsm#523). The account object has no information about the new resource. This will be useful for checking the "to" attribute in received stanzas to make sure that the client is the intended recipient.
Blocks: 955307
Flags: needinfo?(ab)
Attachment #8777281 - Flags: review?(aleth)
Attachment #8777281 - Flags: feedback?(florian)
No longer blocks: 955307
Depends on: 955307
Comment on attachment 8777281 [details] [diff] [review] v1 - update account's resource Review of attachment 8777281 [details] [diff] [review]: ----------------------------------------------------------------- I don't think this is correct. A server-generated resource is per-session and not a property of the account. If there is code using the "account resource" (whatever that is) somewhere then that is likely a bug. As discussed on IRC some time ago, one also has to be careful when checking the resource part of "to" for validation, as it's possible to receive messages addressed to other resources if those resources have gone offline.
Attachment #8777281 - Flags: review?(aleth) → review-
(In reply to Abdelrhman Ahmed [:abdelrhman] from comment #2) > The account object has no information about the new resource. This will be > useful for checking the "to" attribute in received stanzas to make sure that > the client is the intended recipient. Why is that not possible with this._resource that is set on the XMPPSession object?
(In reply to Florian Quèze [:florian] [:flo] from comment #5) > (In reply to Abdelrhman Ahmed [:abdelrhman] from comment #2) > > > The account object has no information about the new resource. This will be > > useful for checking the "to" attribute in received stanzas to make sure that > > the client is the intended recipient. > > Why is that not possible with this._resource that is set on the XMPPSession > object? You mean accessing it using something like (this._connection._resource)? If yes that's possible, but I thought the account's resource |this._resource| should be updated too.
(In reply to Abdelrhman Ahmed [:abdelrhman] from comment #6) > (In reply to Florian Quèze [:florian] [:flo] from comment #5) > > (In reply to Abdelrhman Ahmed [:abdelrhman] from comment #2) > > > > > The account object has no information about the new resource. This will be > > > useful for checking the "to" attribute in received stanzas to make sure that > > > the client is the intended recipient. > > > > Why is that not possible with this._resource that is set on the XMPPSession > > object? > > You mean accessing it using something like (this._connection._resource)? > If yes that's possible, but I thought the account's resource > |this._resource| should be updated too. If I remember correctly the account's resource will be used for the next connection attempt if the account gets disconnected, so it should be back to what the user has set.
Attachment #8777281 - Flags: feedback?(florian)

Resetting assignee due to lack of activity.

Assignee: a.ahmed1026 → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: