Bug #1409
Crash with no Identity
100%
Description
Start with a fresh installation of quassel. Skip create identity. Try to connect to some network.
It crash while accessing a null reference. From a null pointer to a an Identity object which, of course, does not exist.
In the patch, the returned identity is checked if it exist. If not, no new CertIdentity is created and a warning is printed.
Todo:
- Disable GUI components to connect to a network if not identity exist.
- Client::identity() should not returns pointers. Const references are fine.
If no identify exist, may throw an exception. Or return a dummy identify.
Related issues
Associated revisions
History
#1 Updated by digitalcircuit about 4 years ago
Thank you for this! I'll try looking into filing a pull request to get this issue resolved, including making sure the rest of the UI doesn't crash.
#2 Updated by digitalcircuit about 4 years ago
I have filed a pull request featuring your patch. If you'd prefer attribution done differently, e.g. setting the commit author name/email, just let me know!
Thank you for your effort and patience with this.
#3 Updated by Anonymous almost 4 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset quassel|c144bdee0d8ab0c195b3088f5c6e57e372e526f7.
#4 Updated by phuzion over 3 years ago
- Related to Bug #1432: Quassel client crashes when trying to change Network settings added
client: Fix settings crash on missing net identity
When fetching the client identity in Network settings, make sure the
identity exists before trying to convert it into a CertIdentity.
This resolves a crash if an identity is deleted improperly or if no
identities are specified.
Test case:
1. Clear the configuration for Quassel monolithic
2. Start Quassel monolithic
3. Cancel the setup wizard (before creating any identity)
4. Go to Settings -> Configure Quassel... (F7)
5. Navigate to IRC -> Identities, confirm that no identity exists
6. Navigate to IRC -> Networks
7. Add a new network (details don't matter)
8. Observe results
NOTE: This fix was contributed by "kater" on the Quassel IRC bug
tracker. I'm not sure of a better way to provide attribution, as I
don't know if they want their email address part of Quassel's public
record.
See the original patch here:
https://bugs.quassel-irc.org/issues/1409
Fixes #1409