diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-09-17 12:05:52 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-09-17 12:05:52 +0200 |
commit | 420434962743a3575ddac06b1c67e541e813cdf6 (patch) | |
tree | e913a1af4c225b2ea01be2fa66b30c9f7bab3a2d /src/backend/anastasis-httpd_policy-upload.c | |
parent | ae9bf61430da8e6cc0e9b76e560c06c8302ffeb4 (diff) | |
download | anastasis-420434962743a3575ddac06b1c67e541e813cdf6.tar.gz anastasis-420434962743a3575ddac06b1c67e541e813cdf6.tar.bz2 anastasis-420434962743a3575ddac06b1c67e541e813cdf6.zip |
use Etags in double-quotes as per standard, add missing 'return' in tests
Diffstat (limited to 'src/backend/anastasis-httpd_policy-upload.c')
-rw-r--r-- | src/backend/anastasis-httpd_policy-upload.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/anastasis-httpd_policy-upload.c b/src/backend/anastasis-httpd_policy-upload.c index d966eba..fd4e1ca 100644 --- a/src/backend/anastasis-httpd_policy-upload.c +++ b/src/backend/anastasis-httpd_policy-upload.c @@ -757,9 +757,12 @@ AH_handler_policy_post ( MHD_HEADER_KIND, MHD_HTTP_HEADER_IF_NONE_MATCH); if ( (NULL == etag) || + (2 >= strlen (etag)) || + ('"' != etag[0]) || + ('"' != etag[strlen (etag) - 1]) || (GNUNET_OK != - GNUNET_STRINGS_string_to_data (etag, - strlen (etag), + GNUNET_STRINGS_string_to_data (etag + 1, + strlen (etag) - 2, &puc->new_policy_upload_hash, sizeof (puc->new_policy_upload_hash))) ) { |