]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-sasl: When setting port, parse value, not key.
authorAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 11 Aug 2021 06:47:17 +0000 (09:47 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 13 Aug 2021 06:46:44 +0000 (09:46 +0300)
Broken in 228f1e8d583

src/lib-sasl/mech-oauthbearer.c

index ad286e15d2e460df3809fb4bbdfae03758d0cd03..24de0169a07890a2ec330c9e6ccd4a7746781efc 100644 (file)
@@ -155,7 +155,7 @@ mech_oauthbearer_set_parameter(struct dsasl_client *_client, const char *key,
        } else if (strcmp(key, "port") == 0) {
                if (value == NULL) {
                        client->port = 0;
-               } else if (net_str2port(key, &client->port) < 0) {
+               } else if (net_str2port(value, &client->port) < 0) {
                        *error_r = "Invalid port value";
                        return -1;
                }