commit ae8b3a6cc3c319ad7130f8727e8d8c4efde017de
parent d0e1d5cb7d0a176ba4b349615a0d363d133cc1c0
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 29 Jul 2026 17:01:36 +0200
file plugin: free the filename and queue a reply for invalid input
Diffstat:
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/authorization/anastasis_authorization_plugin_file.c b/src/authorization/anastasis_authorization_plugin_file.c
@@ -99,9 +99,19 @@ file_validate (void *cls,
break;
}
}
- if (flag)
- return GNUNET_SYSERR;
GNUNET_free (filename);
+ if (flag)
+ {
+ /* Invalid input is #GNUNET_NO with a reply queued; #GNUNET_SYSERR is
+ reserved for "invalid, and we could not even answer". */
+ if (MHD_NO ==
+ TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_CONFLICT,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "filename"))
+ return GNUNET_SYSERR;
+ return GNUNET_NO;
+ }
return GNUNET_OK;
}