You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2022/01/27 12:30:17 UTC

[incubator-ponymail-foal] branch master updated (b414e8a -> 8e6b914)

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

sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.


    from b414e8a  Update JS version
     new 3547035  Fetch provider once
     new 8e6b914  Bump server version

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:
 server/endpoints/oauth.py | 7 ++++---
 server/server_version.py  | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

[incubator-ponymail-foal] 01/02: Fetch provider once

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

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 354703582fe552f4ff9575c2239619a86bf268cd
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jan 27 12:26:46 2022 +0000

    Fetch provider once
---
 server/endpoints/oauth.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/server/endpoints/oauth.py b/server/endpoints/oauth.py
index dfda64d..8e18e2f 100644
--- a/server/endpoints/oauth.py
+++ b/server/endpoints/oauth.py
@@ -57,10 +57,11 @@ async def process(
         if not uid:
             uid = rv.get("email")
         if uid:
+            oauth_provider = rv.get("oauth_domain", "generic")
             cid = hashlib.shake_128(
-                ("%s-%s" % (rv.get("oauth_domain", "generic"), uid)).encode("ascii", "ignore")
+                ("%s-%s" % (oauth_provider, uid)).encode("ascii", "ignore")
             ).hexdigest(16)
-            authoritative = rv.get("oauth_domain", "generic") in server.config.oauth.authoritative_domains
+            authoritative = oauth_provider in server.config.oauth.authoritative_domains
             admin = authoritative and rv.get("email") in server.config.oauth.admins
             cookie = await plugins.session.set_session(
                 server,
@@ -71,7 +72,7 @@ async def process(
                 # Authoritative if OAuth domain is in the authoritative oauth section in ponymail.yaml
                 # Required for access to private emails
                 authoritative=authoritative,
-                oauth_provider=rv.get("oauth_domain", "generic"),
+                oauth_provider=oauth_provider,
                 oauth_data=rv,
                 admin=admin,
             )

[incubator-ponymail-foal] 02/02: Bump server version

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

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 8e6b914cee2eac9c58fceb438da101f34659027e
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jan 27 12:30:05 2022 +0000

    Bump server version
---
 server/server_version.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/server_version.py b/server/server_version.py
index fbbc752..19de329 100644
--- a/server/server_version.py
+++ b/server/server_version.py
@@ -1,2 +1,2 @@
 # This file is generated by server/update_version.sh
-PONYMAIL_SERVER_VERSION = '1b07832'
+PONYMAIL_SERVER_VERSION = '3547035'