gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-merchant-demos] branch master updated (373f6f2 -> c00f880)


From: gnunet
Subject: [taler-taler-merchant-demos] branch master updated (373f6f2 -> c00f880)
Date: Mon, 07 Sep 2020 14:53:51 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a change to branch master
in repository taler-merchant-demos.

    from 373f6f2  reset order ID when we have a new session ID
     new aefea29  formatting, urlquote cookie path
     new c00f880  gitignore

The 2 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:
 .gitignore                      |  1 +
 talermerchantdemos/blog/blog.py | 18 ++++++++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)
 create mode 100644 .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bee8a64
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+__pycache__
diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py
index 166b194..f510f71 100644
--- a/talermerchantdemos/blog/blog.py
+++ b/talermerchantdemos/blog/blog.py
@@ -33,12 +33,18 @@ from talermerchantdemos.httpcommon import backend_get, 
backend_post
 
 if not sys.version_info.major == 3 and sys.version_info.minor >= 6:
     print("Python 3.6 or higher is required.")
-    print("You are using Python {}.{}.".format(sys.version_info.major, 
sys.version_info.minor))
+    print(
+        "You are using Python {}.{}.".format(
+            sys.version_info.major, sys.version_info.minor
+        )
+    )
     sys.exit(1)
 
 
 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
-app = flask.Flask(__name__, template_folder=BASE_DIR, static_folder=BASE_DIR + 
'/../static/')
+app = flask.Flask(
+    __name__, template_folder=BASE_DIR, static_folder=BASE_DIR + "/../static/"
+)
 app.secret_key = base64.b64encode(os.urandom(64)).decode("utf-8")
 
 LOGGER = logging.getLogger(__name__)
@@ -254,11 +260,15 @@ def article(article_name, data=None):
     au = pay_status.get("already_paid_fulfillment_url")
     if ai is not None and au is not None:
         response = flask.redirect(au)
-        response.set_cookie("order_id", ai, path=f"/essay/{article_name}")
+        response.set_cookie(
+            "order_id", ai, path=urllib.parse.quote(f"/essay/{article_name}")
+        )
         return response
 
     # Redirect the browser to a page where the wallet can
     # run the payment protocol.
     response = flask.redirect(pay_status["order_status_url"])
-    response.set_cookie("order_id", order_id, path=f"/essay/{article_name}")
+    response.set_cookie(
+        "order_id", order_id, path=urllib.parse.quote(f"/essay/{article_name}")
+    )
     return response

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]