)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fe399f1b89623e195d56ee88ad16bf112268eb13","unresolved":true,"context_lines":[{"line_number":9,"context_line":"There\u0027s test_tempauth tests that use paths like `/auth/v1/act/auth` -"},{"line_number":10,"context_line":"but as best I can tell they\u0027re all negative tests?"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"I had no idea swob or tempauth could `path_info_pop`?"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"```"},{"line_number":15,"context_line":"(Pdb) req.path_info"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"0f5a75c9_f7523803","line":12,"updated":"2025-08-20 20:53:41.000000000","message":"Looks like we [inherited it from webob](https://github.com/Pylons/webob/blob/39d5af3c797e7b867f152c2e8c979de42d029403/src/webob/request.py#L502). Now I kinda want to get rid of its use in tempauth and go throw a deprecation warning in swob, too, so we can eventually get rid of it.","commit_id":"89912f3f33538d23fbb3468900d7031e3fc6088b"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"72952092f2ccebca7bef222d7b18cef343b4a8d2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ed09a553_99726300","updated":"2025-09-02 22:45:50.000000000","message":"I\u0027d like this a lot more with something like\n```\ndiff --git a/swift/common/middleware/tempauth.py b/swift/common/middleware/tempauth.py\nindex f7b011e2c..b8211fc4c 100644\n--- a/swift/common/middleware/tempauth.py\n+++ b/swift/common/middleware/tempauth.py\n@@ -821,12 +821,7 @@ class TempAuth(object):\n                   above.\n         \"\"\"\n         # Validate the request info\n-        try:\n-            pathsegs \u003d split_path(req.path_info, 1, 3, True)\n-        except ValueError:\n-            self.logger.increment(\u0027errors\u0027)\n-            return HTTPNotFound(request\u003dreq)\n-        if pathsegs[0] in (\u0027auth\u0027, \u0027v1.0\u0027):\n+        if req.path_info \u003d\u003d \u0027/v1.0\u0027:\n             user \u003d req.headers.get(\u0027x-auth-user\u0027)\n             if not user:\n                 user \u003d req.headers.get(\u0027x-storage-user\u0027)\n@@ -840,7 +835,8 @@ class TempAuth(object):\n             if not key:\n                 key \u003d req.headers.get(\u0027x-storage-pass\u0027)\n         else:\n-            return HTTPBadRequest(request\u003dreq)\n+            self.logger.increment(\u0027errors\u0027)\n+            return HTTPNotFound(request\u003dreq)\n         unauthed_headers \u003d {\n             \u0027Www-Authenticate\u0027: \u0027Swift realm\u003d\"%s\"\u0027 % (account or \u0027unknown\u0027),\n         }\ndiff --git a/test/unit/common/middleware/test_tempauth.py b/test/unit/common/middleware/test_tempauth.py\nindex 0bb561217..66e664a73 100644\n--- a/test/unit/common/middleware/test_tempauth.py\n+++ b/test/unit/common/middleware/test_tempauth.py\n@@ -705,7 +705,7 @@ class TestAuth(unittest.TestCase):\n         ]\n         for path, headers in zip(paths, headers):\n             resp \u003d self._make_request(path).get_response(self.test_auth)\n-            self.assertEqual(resp.status_int, 400)\n+            self.assertEqual(resp.status_int, 404)\n\n     def test_fernet_token_no_memcache(self):\n         swift \u003d FakeSwift()\n```\napplied. A more succinct commit message would also help.","commit_id":"89912f3f33538d23fbb3468900d7031e3fc6088b"}],"swift/common/middleware/tempauth.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fe399f1b89623e195d56ee88ad16bf112268eb13","unresolved":true,"context_lines":[{"line_number":822,"context_line":"        \"\"\""},{"line_number":823,"context_line":"        # Validate the request info"},{"line_number":824,"context_line":"        try:"},{"line_number":825,"context_line":"            pathsegs \u003d split_path(req.path_info, 1, 3, True)"},{"line_number":826,"context_line":"        except ValueError:"},{"line_number":827,"context_line":"            self.logger.increment(\u0027errors\u0027)"},{"line_number":828,"context_line":"            return HTTPNotFound(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":1,"id":"d898c9e6_ac79ce35","line":825,"updated":"2025-08-20 20:53:41.000000000","message":"Do we still need to actually split that, or can we just compare against `req.path_info` below now?","commit_id":"89912f3f33538d23fbb3468900d7031e3fc6088b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fe399f1b89623e195d56ee88ad16bf112268eb13","unresolved":true,"context_lines":[{"line_number":826,"context_line":"        except ValueError:"},{"line_number":827,"context_line":"            self.logger.increment(\u0027errors\u0027)"},{"line_number":828,"context_line":"            return HTTPNotFound(request\u003dreq)"},{"line_number":829,"context_line":"        if pathsegs[0] in (\u0027auth\u0027, \u0027v1.0\u0027):"},{"line_number":830,"context_line":"            user \u003d req.headers.get(\u0027x-auth-user\u0027)"},{"line_number":831,"context_line":"            if not user:"},{"line_number":832,"context_line":"                user \u003d req.headers.get(\u0027x-storage-user\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"880fce68_1623cd31","line":829,"range":{"start_line":829,"start_character":27,"end_line":829,"end_character":33},"updated":"2025-08-20 20:53:41.000000000","message":"Looks like we still support `/auth/auth` -- did you mean to keep that?","commit_id":"89912f3f33538d23fbb3468900d7031e3fc6088b"}]}
