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)
Chat Core
XMPP
Tracking
(Not tracked)
NEW
People
(Reporter: abdelrahman, Unassigned)
References
Details
Attachments
(1 file)
1.08 KB,
patch
|
aleth
:
review-
|
Details | Diff | Splinter Review |
No description provided.
Comment 1•8 years ago
|
||
Please include a description when filing bug. From just the summary, I don't see why this is a bug.
Flags: needinfo?(ab)
Reporter | ||
Comment 2•8 years ago
|
||
(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)
Reporter | ||
Comment 3•8 years ago
|
||
Attachment #8777281 -
Flags: review?(aleth)
Attachment #8777281 -
Flags: feedback?(florian)
Reporter | ||
Updated•8 years ago
|
Comment 4•8 years ago
|
||
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-
Comment 5•8 years ago
|
||
(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?
Reporter | ||
Comment 6•8 years ago
|
||
(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.
Comment 7•8 years ago
|
||
(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.
Updated•7 years ago
|
Attachment #8777281 -
Flags: feedback?(florian)
Comment 8•6 years ago
|
||
Resetting assignee due to lack of activity.
Assignee: a.ahmed1026 → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•