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

arm 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 49bb08c  #601: Add URL encoding safety for URLs currently using 
f-strings
49bb08c is described below

commit 49bb08cec8ce921c210c173bb9c3953edfa1d464
Author: Alastair McFarlane <[email protected]>
AuthorDate: Mon Feb 9 10:37:45 2026 +0000

    #601: Add URL encoding safety for URLs currently using f-strings
---
 atr/get/upload.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/atr/get/upload.py b/atr/get/upload.py
index 05c8280..49f32d3 100644
--- a/atr/get/upload.py
+++ b/atr/get/upload.py
@@ -27,6 +27,7 @@ import atr.get.compose as compose
 import atr.get.keys as keys
 import atr.htm as htm
 import atr.models.sql as sql
+import atr.post as post
 import atr.render as render
 import atr.shared as shared
 import atr.template as template
@@ -68,8 +69,12 @@ async def selected(session: web.Committer, project_name: 
str, version_name: str)
     block.p["Use this form to add files to this candidate draft."]
 
     upload_session_token = secrets.token_hex(16)
-    stage_url = 
f"/upload/stage/{project_name}/{version_name}/{upload_session_token}"
-    finalise_url = 
f"/upload/finalise/{project_name}/{version_name}/{upload_session_token}"
+    stage_url = util.as_url(
+        post.upload.stage, upload_session=upload_session_token, 
project_name=project_name, version_name=version_name
+    )
+    finalise_url = util.as_url(
+        post.upload.finalise, upload_session=upload_session_token, 
project_name=project_name, version_name=version_name
+    )
 
     block.append(
         htpy.div(


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

Reply via email to