Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/plugins install without connected account crashes #1880

Closed
jubalh opened this issue Aug 27, 2023 · 2 comments · Fixed by #1882
Closed

/plugins install without connected account crashes #1880

jubalh opened this issue Aug 27, 2023 · 2 comments · Fixed by #1882
Assignees
Labels
Milestone

Comments

@jubalh
Copy link
Member

jubalh commented Aug 27, 2023

Reason is: 3a86b8c29
Created to fix: #1624

It wants to get the tls setting based on account but doesn't check whether account != NULL.

Options:

  1. /plugins install should only work when we are connected and respect the tls setting according to account
  2. it should take the tls setting from the default account and if none is set cancel
  3. it should always validate the cert. Since it's actually an unrelated decision whether the user wants to validate the certificate of his xmpp server vs any web server where he wants to install his plugins from
  4. a new setting

Personally I like 1 the most.

@jubalh jubalh added the bug label Aug 27, 2023
@jubalh jubalh added this to the next milestone Aug 27, 2023
@jubalh jubalh self-assigned this Aug 27, 2023
@jubalh
Copy link
Member Author

jubalh commented Aug 28, 2023

@sjaeckel opinion? :)

jubalh added a commit that referenced this issue Aug 28, 2023
When we are not connected and run `/plugins install` we crash because we
get the account struct to check for the (xmpp) tls setting.
To apply that to the http (etc) connection to download the plugin from a
server.

This got introduced in 3a86b8c to fix #1624.

There are several ways to handle this (some described in 1880) in this
patch I took the route that it will use secure connection when we are
nto connected and will only check the tls.trust account setting if we
are connected.

Fix #1880
@sjaeckel
Copy link
Member

@sjaeckel opinion? :)

c.f. #1882 (review) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants