Extension and sigit can have different "logged in" users #290

Closed
opened 2024-12-27 10:39:20 +00:00 by enes · 0 comments
Member
  • An error occurred after signing a sigit which caused toast JSON parse error on the first signer.

Steps to reproduce:

  1. Sign in with extension
  2. Change extension options - change the user
  3. Sigit still shows old user - proceed with sigit creation
  4. Notice that signing was successful
  • issue is visible and errors pop up if the creator is also a first signer, if creator is second signer this goes unnoticed
  1. Sigit is in now un unexpected state and will break on arrival after trying to process event with JSON signature parse error

TODO:
Replicate the broken state - different user

  • Detect if the sigit and extension users differ and manually log out (or log in correctly?)

    • only way to detect a difference between logged in user and the one in the extension is by signing an event, result of the signing includes the author's pubkey which is from the extension, and comparing that with the auth will result in the desired comparison
    • Disallow publish if users sigit and extension user mismatch
  • Check processingEvent - what happens if we error out during createSignature parse step

- An error occurred after signing a sigit which caused toast JSON parse error on the first signer. Steps to reproduce: 1. Sign in with extension 2. Change extension options - change the user 3. Sigit still shows old user - proceed with sigit creation 4. Notice that signing was successful - issue is visible and errors pop up if the creator is also a first signer, if creator is second signer this goes unnoticed 5. Sigit is in now un unexpected state and will break on arrival after trying to process event with JSON signature parse error TODO: Replicate the broken state - different user - [x] Detect if the sigit and extension users differ and manually log out (or log in correctly?) - only way to detect a difference between logged in user and the one in the extension is by signing an event, result of the signing includes the author's pubkey which is from the extension, and comparing that with the auth will result in the desired comparison - [x] Disallow publish if users sigit and extension user mismatch - [x] Check processingEvent - what happens if we error out during createSignature parse step
enes added the
Kind/Bug
label 2024-12-27 10:39:20 +00:00
enes self-assigned this 2024-12-27 10:39:20 +00:00
enes added this to the MVP project 2024-12-27 10:39:20 +00:00
enes added a new dependency 2024-12-27 12:21:07 +00:00
b closed this issue 2025-01-02 09:47:04 +00:00
enes moved this to Done in MVP on 2025-01-20 19:18:15 +00:00
enes moved this to Done in MVP on 2025-01-20 19:19:31 +00:00
enes moved this to Done in MVP on 2025-01-20 19:34:21 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:33 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:36 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:38 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:40 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:43 +00:00
enes moved this to Done in MVP on 2025-01-24 09:37:11 +00:00
Sign in to join this conversation.
No description provided.