mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix email registration whitelist handling.
This commit is contained in:
@@ -134,11 +134,11 @@
|
|||||||
"Returns true if email's domain is in the given whitelist or if given
|
"Returns true if email's domain is in the given whitelist or if given
|
||||||
whitelist is an empty string."
|
whitelist is an empty string."
|
||||||
[whitelist email]
|
[whitelist email]
|
||||||
(if (str/blank? whitelist)
|
(if (str/empty-or-nil? whitelist)
|
||||||
true
|
true
|
||||||
(let [domains (str/split whitelist #",\s*")
|
(let [domains (str/split whitelist #",\s*")
|
||||||
email-domain (second (str/split email #"@"))]
|
domain (second (str/split email #"@" 2))]
|
||||||
(contains? (set domains) email-domain))))
|
(contains? (set domains) domain))))
|
||||||
|
|
||||||
(def ^:private sql:profile-existence
|
(def ^:private sql:profile-existence
|
||||||
"select exists (select * from profile
|
"select exists (select * from profile
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
:http {:port 3448}
|
:http {:port 3448}
|
||||||
:nrepl {:port 3447}
|
:nrepl {:port 3447}
|
||||||
:jvm-opts ["-Xmx700m" "-Xms100m" "-XX:+UseSerialGC"]
|
:jvm-opts ["-Xmx700m" "-Xms100m" "-XX:+UseSerialGC"]
|
||||||
|
:dev-http {8888 "classpath:public"}
|
||||||
|
|
||||||
:builds
|
:builds
|
||||||
{:main
|
{:main
|
||||||
|
|||||||
Reference in New Issue
Block a user