anastasis

Credential backup and recovery protocol and service
Log | Files | Refs | Submodules | README | LICENSE

commit b861e45bf034e088ea31795d35eb1a41f4475f7e
parent 06b780b5c0eb1ff1cc594defcede5a429044dd1d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 29 Jul 2026 16:52:01 +0200

cap storage_duration at ANASTASIS_MAX_YEARS_STORAGE in policy upload

Diffstat:
Msrc/backend/anastasis-httpd_policy-upload.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/backend/anastasis-httpd_policy-upload.c b/src/backend/anastasis-httpd_policy-upload.c @@ -848,6 +848,14 @@ AH_handler_policy_post ( TALER_EC_GENERIC_PARAMETER_MALFORMED, "storage_duration (must be non-negative number)"); } + if (years > ANASTASIS_MAX_YEARS_STORAGE) + { + GNUNET_break_op (0); + return TALER_MHD_reply_with_error (connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_GENERIC_PARAMETER_MALFORMED, + "storage_duration"); + } } else {