You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/05/11 10:50:55 UTC

(tooling-trusted-releases) branch main updated (4f0fff0d -> 15a37eab)

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

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


 discard 4f0fff0d #1057 - don't expose cache endpoints in production
     new 15a37eab #1057 - don't expose cache endpoints in production

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4f0fff0d)
            \
             N -- N -- N   refs/heads/main (15a37eab)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 atr/post/user.py | 4 ++++
 1 file changed, 4 insertions(+)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org


(tooling-trusted-releases) 01/01: #1057 - don't expose cache endpoints in production

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 15a37eab10e79be2289ace46ff8e227863a1fb66
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Mon May 11 11:44:44 2026 +0100

    #1057 - don't expose cache endpoints in production
---
 atr/get/user.py  | 6 ++++++
 atr/post/user.py | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/atr/get/user.py b/atr/get/user.py
index 7fe2ba39..6d3da83a 100644
--- a/atr/get/user.py
+++ b/atr/get/user.py
@@ -17,7 +17,10 @@
 
 from typing import Literal
 
+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.shared as shared
@@ -32,6 +35,9 @@ async def cache_get(session: web.Committer, _user_cache: Literal["user/cache"])
     """
     URL: /user/cache
     """
+    if config.is_production_mode():
+        return quart.abort(404)
+
     cache_data = await util.session_cache_read()
     user_cached = session.uid in cache_data
 
diff --git a/atr/post/user.py b/atr/post/user.py
index 8f0e6e5f..4f6f2266 100644
--- a/atr/post/user.py
+++ b/atr/post/user.py
@@ -19,6 +19,7 @@ from typing import Literal
 import quart
 
 import atr.blueprints.post as post
+import atr.config as config
 import atr.form as form
 import atr.get as get
 import atr.htm as htm
@@ -57,6 +58,9 @@ async def session_post(
     """
     URL: /user/cache
     """
+    if config.is_production_mode():
+        return quart.abort(404)
+
     match user_cache_form:
         case shared.user.CacheUserForm():
             await _cache_session(session)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org