From c9ac4fef4b7aa054df72bddf667edea0608d39c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 27 Jan 2023 19:50:15 +0100 Subject: [PATCH] xfer: make xfer types and protocols case sensitive (issue #1872) --- src/plugins/xfer/xfer.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index e0fccb2ca..497e4af53 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -200,9 +200,12 @@ xfer_search_type (const char *type) { int i; + if (!type) + return -1; + for (i = 0; i < XFER_NUM_TYPES; i++) { - if (weechat_strcasecmp (xfer_type_string[i], type) == 0) + if (strcmp (xfer_type_string[i], type) == 0) return i; } @@ -221,9 +224,12 @@ xfer_search_protocol (const char *protocol) { int i; + if (!protocol) + return -1; + for (i = 0; i < XFER_NUM_PROTOCOLS; i++) { - if (weechat_strcasecmp (xfer_protocol_string[i], protocol) == 0) + if (strcmp (xfer_protocol_string[i], protocol) == 0) return i; }