critic
critic copied to clipboard
Fix crashes caused by system installed extensions.
This is a quick fix to avoid crashes in a couple of places. System extensions do not have a Critic user account set as author.
An improved fix for the future would be to use the author information in the extension manifest.
"Imported" as https://critic-review.org/r/415 for testing. I'll merge this to the stable/1 branch first. That's the branch you will want to follow anyway.
On your suggestion for an improved fix: in some cases, maybe. But really there are two roles involved: the "author", which is defined in the MANIFEST
file, and of which there can be many; and the "publisher", who is the Critic user in whose home directory the extension lives. System extensions have no publisher, but they still have one or more authors. But the author would not necessarily map to a user account on the Critic system.
To make this more confusing, the "publisher" role is called "author" in many places in the code. It's has traditionally been the same human being, but its really two distinct roles.
So: in some cases, the actual author was intended, in which case the information from the MANIFEST
file should have been used. (This is never stored in the database, though, so somewhat less available to some parts of the code.) In other cases, the publisher was intended, and those places should have a null check, to support system extensions.