From cd003426f3140a68d95cb1c4668ac4e65968af78 Mon Sep 17 00:00:00 2001 From: ozgen Date: Thu, 9 Apr 2026 15:28:56 +0200 Subject: [PATCH 1/2] fix: Fix NULL xml passed to gsad_envelope in login Login flow passed NULL as xml payload, which led to a GLib critical in g_string_append. Use an empty string instead. --- src/gsad_gmp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gsad_gmp.c b/src/gsad_gmp.c index 3e3cf5f31..24b986c7b 100644 --- a/src/gsad_gmp.c +++ b/src/gsad_gmp.c @@ -20852,8 +20852,10 @@ login (gsad_http_connection_t *con, params_t *params, credentials = gsad_credentials_new (user, language); - gchar *data = - envelope_gmp (NULL, credentials, params, NULL, response_data); + // xml must not be NULL: gsad_envelope() expects a valid string + // and passing NULL would trigger a GLib critical + gchar *data = envelope_gmp (NULL, credentials, params, g_strdup (""), + response_data); ret = gsad_http_create_response (con, data, response_data, gsad_user_get_cookie (user)); From 9ac5b9ea0e7b39eb0faa78028a580b351a22f4f7 Mon Sep 17 00:00:00 2001 From: ozgen Date: Fri, 10 Apr 2026 08:11:21 +0200 Subject: [PATCH 2/2] Use gsad_envelope function instead of envelope_gmp --- src/gsad_gmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gsad_gmp.c b/src/gsad_gmp.c index 24b986c7b..a626989a5 100644 --- a/src/gsad_gmp.c +++ b/src/gsad_gmp.c @@ -20854,8 +20854,8 @@ login (gsad_http_connection_t *con, params_t *params, // xml must not be NULL: gsad_envelope() expects a valid string // and passing NULL would trigger a GLib critical - gchar *data = envelope_gmp (NULL, credentials, params, g_strdup (""), - response_data); + gchar *data = + gsad_envelope (credentials, g_strdup (""), response_data); ret = gsad_http_create_response (con, data, response_data, gsad_user_get_cookie (user));