Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

[bug]: On multiple unverified PushSubscriptions Stalwart always tries to reverify the first #60

Open
1 task done
iNPUTmice opened this issue Nov 17, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@iNPUTmice
Copy link

iNPUTmice commented Nov 17, 2023

What happened?

When creating multiple pending/unverified PushSubscriptions Stalwart always tries to verify only the first one. No PushVerification is ever received on the subsequent PushSubscriptions.

How can we reproduce the problem?

I can reproduce the problem by doing the following steps:

  • Create a PushSubscription with deviceClientId a and url b
  • Do not validate it. (Do not run PushSubscription/set with the verification code
  • Create another PushSubscription with deviceClientId x and URL y
  • Observe a PushVerification request for the first one

Version

v0.4.x

What database are you using?

None

What blob storage are you using?

None

Where is your directory located?

None

What operating system are you using?

None

Relevant log output

{
  "methodCalls": [
    [
      "PushSubscription/set",
      {
        "create": {
          "ps0": {
            "deviceClientId": "88dc94c7-bf67-4756-ae67-0e3e006df112",
            "url": "https://up.conversations.im/push/v2.local.nR81YB6uH3B0pN-_I2f9yXpFyjmS0ig5NgV0T5w-TQjCfZC0YAsDXz5vT3dSK_TBKArO9UdgDQEMna0O5OmKYpPdh3Ri6tDp5wDk17PccNTWQmAhkITLafwSlJ_rPkrKqWVOXIaDPD9rEAjeVVfjbiR-JnYzYYAvOqwiITJRDp2xb7qyteVnL0MxCgE9BUu61sfFyolWFbiQVLrKOKZKFsUwPsT-NA77k3orlnF-h6-LQX5umsmHv-PbwJ_47eZRspfo4kZn2eOdJ6GWR35ZENDbCTcS1cLOfje8ORGGTvdh44bV0L9OJA"
          }
        }
      },
      "0"
    ]
  ],
  "using": [
    "urn:ietf:params:jmap:core"
  ]
}
{
  "methodResponses": [
    [
      "PushSubscription/set",
      {
        "created": {
          "ps0": {
            "id": "c",
            "keys": null,
            "expires": "2023-11-24T12:38:24Z"
          }
        }
      },
      "0"
    ]
  ],
  "sessionState": "3e25b2a0"
}

Received via WebPush:

PushVerification{pushSubscriptionId=a, verificationCode=z9iQlcXES5iUgCx2v5o9CO1Hr1T4LWO6}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@iNPUTmice iNPUTmice added the bug Something isn't working label Nov 17, 2023
@iNPUTmice
Copy link
Author

Hi,

somewhat related I've just implemented WebPush encryption and when I try to enable that on the server the server acknowledges this just fine but I’m not getting any notifcations

Here is what I use to create the PushSubscription:

{"methodCalls":[["PushSubscription/set",{"create":{"ps0":{"deviceClientId":"6acb1ae7-9a7e-4b6c-9fff-963bb8d69d81","keys":{"auth":"EFgUW3Rk48xRzYiD","p256dh":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEs0fuQdcb5pK8Px-c2VuuJ4KO14Fta-AQEdQ8K3K_6a4Rw4U7KMIwVUSID0sWSIWSWiyCQG1EbW1XddUT0nBoDQ\u003d\u003d"},"url":"https://up.conversations.im/push/v2.local.fP8jgIeuQCKPseWpeEZiavuxlNEifveP2zuRJMmpMprHicTx2yXMizymCANlV1rd7IgcykHx24ViQPv_JueRrQnWbmQ7I8FcfSc7FeTIZ3-MVn5RMnkkecPcpTYvrA5CKSL3usdgcUgQ2ujhs0LxibqZHZ58oqt61z3XxAi8NsnUX-gZXoCRdhJJCcKDeE1u4QGf4rQPxlYznfge5fhpN__V97Lx9cgPa04un9mQTnFDKVJkTwH1pQls0HUqSRegEeKq_BfEy30QEI0g1LItUExn27ZtVTrtfWJfU1if2FbkDwdTDP3lPw"}},"destroy":[]},"0"]],"using":["urn:ietf:params:jmap:core"]}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants