]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: FormPost returns 401 Unauthorized instead of 403 Forbidden.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 2 Dec 2016 17:43:43 +0000 (18:43 +0100)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Mon, 24 Apr 2017 15:32:16 +0000 (17:32 +0200)
This patch emerged because newer versions of Tempest became
more restrictive in the matter of FormPost's error handling.
Previously, Tempest was accepting both 403 Forbidden as well
as 401 Unauthorized as a response for signature mismatch or
expired form. Actually only the second one is acceptable for
tempest.api.object_storage.test_object_formpost_negative.*

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_rest_swift.cc

index 1ed87c6cb1afe36ae27a0b36f8f60c01188b537e..f1a3f787fabdfb0a15205634e364a61900a36166 100644 (file)
@@ -1877,12 +1877,12 @@ int RGWFormPost::get_params()
 
   if (! is_non_expired()) {
     err_msg = "FormPost: Form Expired";
-    return -EACCES;
+    return -EPERM;
   }
 
   if (! is_integral()) {
     err_msg = "FormPost: Invalid Signature";
-    return -EACCES;
+    return -EPERM;
   }
 
   return 0;