]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: login-proxy - Add login_proxy_input_halt()
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 27 Nov 2025 23:42:07 +0000 (00:42 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 1 Dec 2025 06:50:46 +0000 (06:50 +0000)
Halts input from proxy server early so that proxy_parse_input callback is not
called again.

src/login-common/login-proxy.c
src/login-common/login-proxy.h

index 278142e8c7bcd5cd94bc36664e0bc84e48434f2c..8830c01a317ce2501e16f5df22260c587982ece2 100644 (file)
@@ -1354,6 +1354,11 @@ bool login_proxy_failed_because_invalid_cert(struct login_proxy *proxy)
                state == SSL_IOSTREAM_STATE_NAME_MISMATCH;
 }
 
+void login_proxy_input_halt(struct login_proxy *proxy)
+{
+       io_remove(&proxy->server_io);
+}
+
 void login_proxy_multiplex_input_start(struct login_proxy *proxy)
 {
        struct istream *input = i_stream_create_multiplex(proxy->server_input,
index cc554486e19249842e879ec2e1f152b938806e19..9434b6c65ec7fd8b31a53bdfc6bb4ffcc664970f 100644 (file)
@@ -113,6 +113,8 @@ bool login_proxy_is_ourself(const struct client *client, const char *host,
                            const struct ip_addr *hostip,
                            in_port_t port, const char *destuser);
 
+/* Halt input from proxy server early */
+void login_proxy_input_halt(struct login_proxy *proxy);
 /* Detach proxy from client. This is done after the authentication is
    successful and all that is left is the dummy proxying. */
 void login_proxy_detach(struct login_proxy *proxy);