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

redacted e2e message says "Unable to decrypt: Unknown encryption algorithm "undefined"." #3744

Closed
uhoreg opened this issue Apr 26, 2017 · 4 comments
Labels
A-E2EE P1 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@uhoreg
Copy link
Member

uhoreg commented Apr 26, 2017

From the #megolm room:
screenshot - 260417 - 01 28 00 pm

It should just not try to decrypt the message if it has been redacted.

FWIW, view source on that message says:

{
  "origin_server_ts": 1493156450619,
  "sender": "@aaron:raim.ist",
  "event_id": "$14931564505asBdk:raim.ist",
  "age": 71191306,
  "unsigned": {
    "age": 71191306,
    "redacted_by": "$14931577096KrKPI:raim.ist",
    "redacted_because": {
      "origin_server_ts": 1493157709838,
      "sender": "@aaron:raim.ist",
      "event_id": "$14931577096KrKPI:raim.ist",
      "age": 69932087,
      "unsigned": {
        "age": 69932087
      },
      "content": {},
      "redacts": "$14931564505asBdk:raim.ist",
      "room_id": "!UCnwUWwIKhcpaPTHtR:sw1v.org",
      "user_id": "@aaron:raim.ist",
      "type": "m.room.redaction"
    }
  },
  "content": {},
  "room_id": "!UCnwUWwIKhcpaPTHtR:sw1v.org",
  "user_id": "@aaron:raim.ist",
  "type": "m.room.encrypted",
  "redacted_because": {
    "origin_server_ts": 1493157709838,
    "sender": "@aaron:raim.ist",
    "event_id": "$14931577096KrKPI:raim.ist",
    "age": 69932087,
    "unsigned": {
      "age": 69932087
    },
    "content": {},
    "redacts": "$14931564505asBdk:raim.ist",
    "room_id": "!UCnwUWwIKhcpaPTHtR:sw1v.org",
    "user_id": "@aaron:raim.ist",
    "type": "m.room.redaction"
  }
}
@ara4n
Copy link
Member

ara4n commented Oct 4, 2017

this is really really ugly.

uhoreg added a commit to uhoreg/matrix-js-sdk that referenced this issue Oct 4, 2017
…#3744)

set the decrypted data to an empty message

Signed-off-by: Hubert Chathi <hubert@uhoreg.ca>
uhoreg added a commit to uhoreg/matrix-js-sdk that referenced this issue Oct 4, 2017
…#3744)

set the decrypted data to an empty message

Signed-off-by: Hubert Chathi <hubert@uhoreg.ca>
richvdh added a commit to matrix-org/matrix-js-sdk that referenced this issue Oct 24, 2017
don't try to decrypt a redacted message (fixes element-hq/element-web#3744)
@uhoreg
Copy link
Member Author

uhoreg commented Oct 24, 2017

Fixed by matrix-org/matrix-js-sdk#554

@uhoreg uhoreg closed this as completed Oct 24, 2017
@michel-zimmer
Copy link

This exact issue is happening again for me as far as I can tell:

Decrypted event source:

{
  "type": "m.room.message",
  "content": {
    "msgtype": "m.bad.encrypted",
    "body": "** Unable to decrypt: Unknown encryption algorithm \"undefined\". **"
  }
}

Original event source:

{
  "content": {},
  "origin_server_ts": 1593761398124,
  "room_id": "!…:matrix.org",
  "sender": "@michel-zimmer:matrix.org",
  "type": "m.room.encrypted",
  "unsigned": {
    "redacted_by": "$6M1oJkRMLfn3k1ALmnLbbWq2vemoO6cCLomowO4BkbM",
    "redacted_because": {
      "content": {},
      "origin_server_ts": 1593764558519,
      "redacts": "$VmprAKEQ9RA_NloLleUbkCKPpf8FWVf5yly2gD_mW58",
      "room_id": "!…:matrix.org",
      "sender": "@michel-zimmer:matrix.org",
      "type": "m.room.redaction",
      "unsigned": {
        "age": 22680076733
      },
      "event_id": "$6M1oJkRMLfn3k1ALmnLbbWq2vemoO6cCLomowO4BkbM",
      "user_id": "@michel-zimmer:matrix.org",
      "age": 22680076733
    },
    "age": 22683237128
  },
  "event_id": "$VmprAKEQ9RA_NloLleUbkCKPpf8FWVf5yly2gD_mW58",
  "user_id": "@michel-zimmer:matrix.org",
  "age": 22683237128,
  "redacted_because": {
    "content": {},
    "origin_server_ts": 1593764558519,
    "redacts": "$VmprAKEQ9RA_NloLleUbkCKPpf8FWVf5yly2gD_mW58",
    "room_id": "!…:matrix.org",
    "sender": "@michel-zimmer:matrix.org",
    "type": "m.room.redaction",
    "unsigned": {
      "age": 22680076733
    },
    "event_id": "$6M1oJkRMLfn3k1ALmnLbbWq2vemoO6cCLomowO4BkbM",
    "user_id": "@michel-zimmer:matrix.org",
    "age": 22680076733
  }
}

Is there anything I can do?

@SimonBrandner
Copy link
Contributor

@michel-zimmer, it might be better to open a new issue in this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE P1 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

No branches or pull requests

5 participants