Skip to content
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

XEP-0280: Wrapped messages missing a 'from' or 'to' #488

Open
ge0rg opened this issue Jul 18, 2017 · 0 comments
Open

XEP-0280: Wrapped messages missing a 'from' or 'to' #488

ge0rg opened this issue Jul 18, 2017 · 0 comments

Comments

@ge0rg
Copy link
Contributor

ge0rg commented Jul 18, 2017

Under certain conditions and with some implementations, a message (the one in the payload) might be missing either 'from' or 'to' attributes, because those were missing on the original message and were not sanitized by the server.

One example from prosody's carbon code, where a 'sent' carbon of a message-to-myself ends up without a 'to':

<sent xmlns="urn:xmpp:carbons:2">
  <forwarded xmlns="urn:xmpp:forward:0">
    <message id="x" from="[email protected]/desktop" type="chat">
      <body>Hi!</body><request xmlns="urn:xmpp:receipts"/>
    </message>
  </forwarded>
</sent>

The exact semantics of filling-in the right 'from' and 'to' attributes are defined within the scope of a session, but not for messages.

I propose to change XEP-0280 to either require the server to set both 'from' and 'to' on the inner message (good), or to add a section to the Business Rules that describes how a client has to work around this, because, frankly, it's a complex matter and I'm sure many clients will be doing it wrong.

As I still have a pending PR on 0280, #434, I could imagine adding the change as part of that breaking change, as soon as a way forward is determined there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant