-
-
Notifications
You must be signed in to change notification settings - Fork 223
Some fixes #2080
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
Open
sjaeckel
wants to merge
24
commits into
master
Choose a base branch
from
some-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+976
−902
Open
Some fixes #2080
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
48ac88d
Fix `GError` handling
sjaeckel 2fb56b8
Fix some more untyped APIs
sjaeckel 1aeb19a
Print PID in debug logs.
sjaeckel 79ff9ba
Fix OMEMO startup
sjaeckel 24c3b5d
Add new command `/changes`
sjaeckel 7f5ae43
Fix more memleaks
sjaeckel ad82a6e
Prepare to use SHA256 fingerprints of certs.
sjaeckel 1c335e4
Retrieve and save new fingerprints from libstrophe.
sjaeckel b7f4c24
Use the stronger certificate fingerprint.
sjaeckel 532b9d6
Free in reverse order.
sjaeckel a6510c7
Simplify `conf_string_list_{add,remove}()` implementations.
sjaeckel 5fc8925
Use `gboolean` consistently.
sjaeckel ff35cb0
Refactor tlscerts.
sjaeckel f7a0990
Minor improvements.
sjaeckel b19d92e
Minor improve theme
sjaeckel d06bf74
Fix overwriting new accounts when running multiple instances.
sjaeckel ac68978
Simplify `accounts_get_account()`.
sjaeckel 950bb0e
Consistency please.
sjaeckel 93d6beb
When renaming an account, copy all existing keys.
sjaeckel 61cb167
Fix reconnect when no account has been set up yet.
sjaeckel 337409a
Minor fixes of accounts.
sjaeckel 91b5818
Fix invalid free after `/omemo gen`
sjaeckel aa1e22f
Fix memory leaks when OMEMO keys have not been generated yet.
sjaeckel 57ec5c8
Don't publish keys if the server doesn't support pubsub.
sjaeckel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,10 +35,10 @@ jobs: | |
| # if this check fails, you have to update the number of auto types known and the list of auto types in the check below | ||
| - name: Check auto types are up-to-date | ||
| run: | | ||
| [[ "$(find src -type f -name '*.[ch]' -exec awk '/^#define auto_[\W]*/ {print $2}' '{}' \; | sort -u | wc -l)" == "8" ]] || exit -1 | ||
| [[ "$(find src -type f -name '*.[ch]' -exec awk '/^#define auto_[\W]*/ {print $2}' '{}' \; | sort -u | wc -l)" == "9" ]] || exit -1 | ||
| - name: Check auto types are initialized | ||
| run: | | ||
| grep -P 'auto_(char|gchar|gcharv|guchar|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true | ||
| grep -P 'auto_(char|gchar|gcharv|gerror|guchar|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true | ||
| - name: Run clang-format | ||
| uses: jidicula/[email protected] | ||
| with: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,6 +105,9 @@ static gboolean _cmd_has_tag(Command* pcmd, const char* const tag); | |
| * Command list | ||
| */ | ||
|
|
||
| #define CMD_TLS_DIRECT "Use direct TLS for the connection. It means TLS handshake is started right after TCP connection is established." | ||
| #define CMD_TLS_LEGACY "Alternative keyword for 'direct', which was created when one still thought that 'STARTTLS' is the future." | ||
|
|
||
| // clang-format off | ||
| static const struct cmd_t command_defs[] = { | ||
| { CMD_PREAMBLE("/help", | ||
|
|
@@ -146,7 +149,7 @@ static const struct cmd_t command_defs[] = { | |
| CMD_TAG_CONNECTION) | ||
| CMD_SYN( | ||
| "/connect [<account>]", | ||
| "/connect <account> [server <server>] [port <port>] [tls force|allow|trust|legacy|disable] [auth default|legacy]", | ||
| "/connect <account> [server <server>] [port <port>] [tls force|allow|trust|direct|disable|legacy] [auth default|legacy]", | ||
| "/connect <server>") | ||
| CMD_DESC( | ||
| "Login to a chat service. " | ||
|
|
@@ -161,8 +164,9 @@ static const struct cmd_t command_defs[] = { | |
| { "tls force", "Force TLS connection, and fail if one cannot be established, this is default behaviour." }, | ||
| { "tls allow", "Use TLS for the connection if it is available." }, | ||
| { "tls trust", "Force TLS connection and trust server's certificate." }, | ||
| { "tls legacy", "Use legacy TLS for the connection. It means server doesn't support STARTTLS and TLS is forced just after TCP connection is established." }, | ||
| { "tls direct", CMD_TLS_DIRECT }, | ||
| { "tls disable", "Disable TLS for the connection." }, | ||
| { "tls legacy", CMD_TLS_LEGACY }, | ||
| { "auth default", "Default authentication process." }, | ||
| { "auth legacy", "Allow legacy authentication." }) | ||
| CMD_EXAMPLES( | ||
|
|
@@ -2070,7 +2074,7 @@ static const struct cmd_t command_defs[] = { | |
| "/account set <account> pgpkeyid <pgpkeyid>", | ||
| "/account set <account> startscript <script>", | ||
| "/account set <account> clientid \"<name> <version>\"", | ||
| "/account set <account> tls force|allow|trust|legacy|disable", | ||
| "/account set <account> tls force|allow|trust|direct|disable|legacy", | ||
| "/account set <account> auth default|legacy", | ||
| "/account set <account> theme <theme>", | ||
| "/account set <account> session_alarm <max_sessions>", | ||
|
|
@@ -2116,8 +2120,9 @@ static const struct cmd_t command_defs[] = { | |
| { "set <account> tls force", "Force TLS connection, and fail if one cannot be established, this is default behaviour." }, | ||
| { "set <account> tls allow", "Use TLS for the connection if it is available." }, | ||
| { "set <account> tls trust", "Force TLS connection and trust server's certificate." }, | ||
| { "set <account> tls legacy", "Use legacy TLS for the connection. It means server doesn't support STARTTLS and TLS is forced just after TCP connection is established." }, | ||
| { "set <account> tls direct", CMD_TLS_DIRECT }, | ||
| { "set <account> tls disable", "Disable TLS for the connection." }, | ||
| { "set <account> tls legacy", CMD_TLS_LEGACY }, | ||
| { "set <account> auth default", "Use default authentication process." }, | ||
| { "set <account> auth legacy", "Allow legacy authentication." }, | ||
| { "set <account> theme <theme>", "Set the UI theme for the account." }, | ||
|
|
@@ -2352,6 +2357,15 @@ static const struct cmd_t command_defs[] = { | |
| "/omemo char *") | ||
| }, | ||
|
|
||
| { CMD_PREAMBLE("/changes", | ||
| parse_args, 0, 0, NULL) | ||
| CMD_MAINFUNC(cmd_changes) | ||
| CMD_SYN( | ||
| "/changes") | ||
| CMD_DESC( | ||
| "Show changes from saved configuration file.") | ||
| }, | ||
|
|
||
|
Comment on lines
+2360
to
+2368
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this one? I was sometimes wondering what I've modified at runtime and had no way to find out before
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's actually a super cool idea! |
||
| { CMD_PREAMBLE("/save", | ||
| parse_args, 0, 0, NULL) | ||
| CMD_MAINFUNC(cmd_save) | ||
|
|
@@ -2650,7 +2664,7 @@ static const struct cmd_t command_defs[] = { | |
| CMD_TAGS( | ||
| CMD_TAG_CONNECTION) | ||
| CMD_SYN( | ||
| "/register <username> <server> [port <port>] [tls force|allow|trust|legacy|disable]") | ||
| "/register <username> <server> [port <port>] [tls force|allow|trust|direct|disable|legacy]") | ||
| CMD_DESC( | ||
| "Register an account on a server.") | ||
| CMD_ARGS( | ||
|
|
@@ -2660,8 +2674,9 @@ static const struct cmd_t command_defs[] = { | |
| { "tls force", "Force TLS connection, and fail if one cannot be established. This is the default behavior." }, | ||
| { "tls allow", "Use TLS for the connection if it is available." }, | ||
| { "tls trust", "Force TLS connection and trust the server's certificate." }, | ||
| { "tls legacy", "Use legacy TLS for the connection. This forces TLS just after the TCP connection is established. Use when a server doesn't support STARTTLS." }, | ||
| { "tls disable", "Disable TLS for the connection." }) | ||
| { "tls direct", CMD_TLS_DIRECT }, | ||
| { "tls disable", "Disable TLS for the connection." }, | ||
| { "tls legacy", CMD_TLS_LEGACY }) | ||
| CMD_EXAMPLES( | ||
| "/register odin valhalla.edda ", | ||
| "/register freyr vanaheimr.edda port 5678", | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about that? I plan to add a similar flag to libstrophe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!