Problem/Motivation
If keys could not be generated so generateKeys in ActivityPubFormAlter.php returns false it should not allow to save the actor. As expected, if there's no key the other sites will return it when trying to interact:
[error] Error creating the signature: Unable to read key
[error] Outbox exception to https://mastodon.social/inbox for x to https://mastodon.social/inbox: Client error: `POST https://mastodon.social/inbox` resulted in a `401 Unauthorized` response:
Incompatible request signature. keyId and signature are requiredLeading to a bad experience by the end user, as no signal of failure is presented to the user while no communication could be established from outside.
Steps to reproduce
Create the actor while private directory is forbidden to write in.
Proposed resolution
Do not allow actor save if keys could not be generated.
User interface changes
Do not save the actor and additionally show a message to the user reporting that keys could not be generated.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3319068-5.patch | 989 bytes | aleix |
| #3 | 3319068-2.patch | 986 bytes | aleix |
Issue fork activitypub-3319068
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
swentel commentedHmm, yeah, I added a warning already on the form when you want to try and enable an actor but the private wrapper does not exists, but I guess it should be much harder still :)
Comment #3
aleixSomething is failing in issue forking :/ attaching patch
Comment #4
swentel commentedLooks good, the only thing I would change is : 'Check the logs or ask administrator' to 'Check the logs or ask an administrator'
After that, I'll commit!
Comment #5
aleixchanged
Comment #7
swentel commentedCommitted and pushed, thanks!
Comment #8
swentel commented