E2EE warning messages have no context #2

Closed
opened 2021-07-29 01:05:16 +00:00 by phryk · 1 comment
Owner

Currently, users only get a static string as message from the special JID of just the domain (i.e the service) when not using E2EE.

Error messages that are injected into a conversation are a thing but not implemented in all clients.

Zash says this is used something like

util.stanza.error_reply(
	util.stanza.message({
		type="chat"
		to="user@example"
	}),
	"cancel",
	"policy-violation",
	"Y U NO ENCRYPT",
	"myserver.local"
)

error_reply is defined in util.stanza.

  • error type for "optional" policy should be continue
  • error type for "required" policy should be cancel

Also implement fallback behavior – basically the current behavior but replace string "<jid>" in the warning message string with recipient JID (should work fine with direct messages and MUCs)

Currently, users only get a static string as message from the special JID of just the domain (i.e the service) when not using E2EE. Error messages that are injected into a conversation are a thing but not implemented in all clients. Zash says this is used something like ```lua util.stanza.error_reply( util.stanza.message({ type="chat" to="user@example" }), "cancel", "policy-violation", "Y U NO ENCRYPT", "myserver.local" ) ``` `error_reply` is defined in `util.stanza`. * error type for "optional" policy should be `continue` * error type for "required" policy should be `cancel` Also implement fallback behavior – basically the current behavior but replace string "\<jid\>" in the warning message string with recipient JID (should work fine with direct messages and MUCs)
Author
Owner

util.stanza.error_reply was already used for required policy, but is apparently not supported by many clients (at least not by dino).

cad3bef48e fixes the issue partially by adding e2e_policy_warn_mechanism, but the fallback solution still has to be
implemented because we currently can't deploy with it set to error and so have to inject context into the message content.

`util.stanza.error_reply` was already used for `required` policy, but is apparently not supported by many clients (at least not by dino). cad3bef48e93c54d3a258c7bec48e3734c42a416 fixes the issue partially by adding `e2e_policy_warn_mechanism`, but the fallback solution still has to be implemented because we currently can't deploy with it set to `error` and so have to inject context into the message content.
phryk closed this issue 2021-08-03 15:06:55 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: phryk-evil-mad-sciences-llc/mod_e2e_policy#2
No description provided.