Address 301 redirect issue and Safari regex issue. (#143)
authorJames Julich <51384945+jamesjulich@users.noreply.github.com>
Tue, 19 Oct 2021 12:39:30 +0000 (07:39 -0500)
committerGitHub <noreply@github.com>
Tue, 19 Oct 2021 12:39:30 +0000 (18:09 +0530)
* Address 301 redirect issue and Safari regex issue.

* Restored login redirect

as this doesn't not fix the sso redirect #143.

Co-authored-by: Ajay Bura <32841439+ajbura@users.noreply.github.com>
src/app/molecules/sso-buttons/SSOButtons.jsx

index 82e8cc4cead3accb8b9e00b2f983aa1dfceb7cd6..76f865a14c7b0abb5eba7a9f9972e0508bab18e4 100644 (file)
@@ -9,7 +9,7 @@ function SSOButtons({ homeserver }) {
 
   useEffect(() => {
     // If the homeserver passed in is not a fully-qualified domain name, do not update.
-    if (!homeserver.match('(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-).)+[a-zA-Z]{2,63}$)')) {
+    if (!homeserver.match('^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\\.[a-zA-Z]{2,})+$')) {
       return;
     }