diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-04-05 23:52:55 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-04-12 17:17:20 +0200 |
commit | 9ccdc5aff690ece41dae365505a1d09c5a897b43 (patch) | |
tree | 30fbe3a97c4fb5b6556ac28b92db33c7f78fc0d8 /src | |
parent | 62171c5974bc805e91ae39845fe65432cf3b27fa (diff) | |
download | weechat-9ccdc5aff690ece41dae365505a1d09c5a897b43.zip |
irc: check that IRC URL starts with "irc" (issue #1903)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-server.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 25f2077e3..ee248dec1 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -1726,6 +1726,9 @@ irc_server_alloc_with_url (const char *irc_url) if (!irc_url || !irc_url[0]) return NULL; + if (weechat_strncasecmp (irc_url, "irc", 3) != 0) + return NULL; + irc_url2 = strdup (irc_url); if (!irc_url2) return NULL; |