From 432d24dc94a49db6b977fedec2b90c2bd65d5dea Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 22 Apr 2021 07:49:53 +0200 Subject: [PATCH 1/2] :bug: Fix manage.sh script on docker images. --- backend/scripts/manage.template.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/scripts/manage.template.sh b/backend/scripts/manage.template.sh index 31ccabffe..31f261b6b 100644 --- a/backend/scripts/manage.template.sh +++ b/backend/scripts/manage.template.sh @@ -16,4 +16,4 @@ if [ -f ./environ ]; then source ./environ fi -exec $JAVA_CMD $JVM_OPTS -classpath $(cat classpath) -Dlog4j2.configurationFile=./log4j2.xml clojure.main -m app.cli.manage "\$@" +exec $JAVA_CMD $JVM_OPTS -classpath $(cat classpath) -Dlog4j2.configurationFile=./log4j2.xml clojure.main -m app.cli.manage "$@" From 8ecc0b3cd950f4860edc42ee515f075111214e34 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 26 Apr 2021 11:19:50 +0200 Subject: [PATCH 2/2] :bug: Fix email registration whitelist handling. --- backend/src/app/rpc/mutations/profile.clj | 6 +++--- frontend/shadow-cljs.edn | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/src/app/rpc/mutations/profile.clj b/backend/src/app/rpc/mutations/profile.clj index dc0ec95fe..3e27d4e5e 100644 --- a/backend/src/app/rpc/mutations/profile.clj +++ b/backend/src/app/rpc/mutations/profile.clj @@ -134,11 +134,11 @@ "Returns true if email's domain is in the given whitelist or if given whitelist is an empty string." [whitelist email] - (if (str/blank? whitelist) + (if (str/empty-or-nil? whitelist) true (let [domains (str/split whitelist #",\s*") - email-domain (second (str/split email #"@"))] - (contains? (set domains) email-domain)))) + domain (second (str/split email #"@" 2))] + (contains? (set domains) domain)))) (def ^:private sql:profile-existence "select exists (select * from profile diff --git a/frontend/shadow-cljs.edn b/frontend/shadow-cljs.edn index e8fd91070..28b0dd0c2 100644 --- a/frontend/shadow-cljs.edn +++ b/frontend/shadow-cljs.edn @@ -2,6 +2,7 @@ :http {:port 3448} :nrepl {:port 3447} :jvm-opts ["-Xmx700m" "-Xms100m" "-XX:+UseSerialGC"] + :dev-http {8888 "classpath:public"} :builds {:main