This is an automated email from the ASF dual-hosted git repository.

wave pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new 8e210963 block published endpoints when not testing
8e210963 is described below

commit 8e210963669c25c861ff77ec4585ae81a886382d
Author: Dave Fisher <[email protected]>
AuthorDate: Fri Mar 6 10:28:40 2026 -0800

    block published endpoints when not testing
---
 atr/get/published.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/atr/get/published.py b/atr/get/published.py
index b8316a14..44cd7815 100644
--- a/atr/get/published.py
+++ b/atr/get/published.py
@@ -24,6 +24,7 @@ import aiofiles.os
 import quart
 
 import atr.blueprints.get as get
+import atr.config as config
 import atr.form as form
 import atr.htm as htm
 import atr.models.unsafe as unsafe
@@ -41,6 +42,8 @@ async def path(session: web.Committer, _published: 
Literal["published"], file_pa
     # This route is for debugging
     # When developing locally, there is no proxy to view the downloads 
directory
     # Therefore this path acts as a way to check the contents of that directory
+    if not config.get().ALLOW_TESTS:
+        return quart.abort(404)
     validated_path = form.to_relpath(str(file_path))
     if validated_path is None:
         return quart.abort(400)
@@ -52,6 +55,8 @@ async def root(session: web.Committer, _published: 
Literal["published/"]) -> web
     """
     URL: /published/
     """
+    if not config.get().ALLOW_TESTS:
+        return quart.abort(404)
     return await _path(session, "")
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to