diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-03-31 13:57:32 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-07 13:18:13 +0200 |
commit | 4460f92727dc024bf89407c94bf899b914823a67 (patch) | |
tree | fa5aa052a24901c7d29a9ae4abc90155937f1dc2 /src/plugins/relay | |
parent | f507be41284ec6b06f0a43011a4658e5f786d5f4 (diff) | |
download | weechat-4460f92727dc024bf89407c94bf899b914823a67.zip |
relay: stop URL address before the first question mark if colon is not found (issue #2066)
Diffstat (limited to 'src/plugins/relay')
-rw-r--r-- | src/plugins/relay/relay-remote.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/relay/relay-remote.c b/src/plugins/relay/relay-remote.c index 15dc42b50..f7d9becb4 100644 --- a/src/plugins/relay/relay-remote.c +++ b/src/plugins/relay/relay-remote.c @@ -252,6 +252,9 @@ relay_remote_get_address (const char *url) return NULL; pos = strchr (ptr_start, ':'); + if (!pos) + pos = strchr (ptr_start, '?'); + return (pos) ? weechat_strndup (ptr_start, pos - ptr_start) : strdup (ptr_start); } |