Skip to content

Commit e9a2beb

Browse files
committed
Fix url test pb
1 parent 779cda7 commit e9a2beb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Ubiquity/client/oauth/OAuthAdmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public static function getEnabledProviders() {
195195
$actualProviders = self::loadProvidersConfig();
196196
foreach ($actualProviders as $name => $config) {
197197
if (isset($config['enabled']) && $config['enabled'] === true) {
198-
$result[] = $name;
198+
$result[strtolower($name)] = $name;
199199
}
200200
}
201201
return $result;

src/Ubiquity/controllers/auth/AbstractOAuthController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ abstract class AbstractOAuthController extends Controller {
2222
protected $provider;
2323

2424
public function _oauth(string $name) {
25-
$link = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . "://{$_SERVER['HTTP_HOST']}/{$_SERVER['REQUEST_URI']}";
25+
$requestURI = trim(strtok($_SERVER["REQUEST_URI"], '?'), '/');
26+
$link = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . "://{$_SERVER['HTTP_HOST']}/{$requestURI}";
2627
$this->provider = OAuthManager::startAdapter($name, $link);
2728
$this->onConnect($name, $this->provider);
2829
}

0 commit comments

Comments
 (0)