fix empty url scheme
authorMichael Wallner <mike@php.net>
Tue, 8 Oct 2019 13:33:39 +0000 (15:33 +0200)
committerMichael Wallner <mike@php.net>
Fri, 20 Dec 2019 12:22:00 +0000 (13:22 +0100)
app/Controller/Github/Signin.php

index 5f8b6a7709944527d477e9a75b0077796db97875..2370bc6840e5ce21bbb902d61d8827c2424b3ed0 100644 (file)
@@ -45,6 +45,9 @@ class Signin extends Github
                        }
                }
                $callback = $this->app->getBaseUrl()->mod(":./github/callback");
+               if (empty($callback->scheme)) {
+                       $callback->scheme = "https";
+               }
                $location = $this->github->getAuthUrl($callback);
                $this->app->redirect($location);
                if (($returnto = $this->app->getRequest()->getQuery("returnto"))) {