-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SASL2, BIND2, and FAST #1006
Changes from 1 commit
4c3a481
3fb0a08
36f543f
2d3bde9
46f3ee6
917f30b
d9b0711
3477d68
42cccdb
296000d
b8e0fac
9f6ad2f
675aab9
30ca0a7
f2e29fa
2fd7003
96d50c8
faf34ef
07f4250
069d0f6
54db23a
7ce1b2f
21bb7cb
441efe0
ca6b6f5
e37dfbf
c5645bc
195cda5
2e1782f
c7e17c9
9973b6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -263,6 +263,9 @@ class Connection extends EventEmitter { | |||||||
this.socket.secure() && | ||||||||
(this.streamFrom || this.jid) | ||||||||
) { | ||||||||
// When the stream is secure there is no leak to setting the stream from | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Needs clarification and a reference to the spec 🙏 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What kind of clarification would you like for that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spec reference:
|
||||||||
// This is suggested in general and in required for FAST implementations | ||||||||
// in particular | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see it in the spec |
||||||||
headerElement.attrs.from = (this.streamFrom || this.jid).toString(); | ||||||||
} | ||||||||
headerElement.attrs["xml:lang"] = lang; | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a new
streamFrom
param?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we want to set the from on initial connection, before the jid is otherwise known in a c2s case, so it must be provided by the caller. Setting the jid too early causes various parts of the library to assume we have done binding already since that is where that value comes from curretly.