mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-02-20 01:21:20 +01:00
Fix regression that broke use_secure_urls feature (#9052)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
- Fix potential HTTP protocol version mismatch (#8982)
|
||||
- Fix bug where installto.sh/update.sh scripts were removing some essential options from the config file (#9051)
|
||||
- Update jQuery-UI to version 1.13.2 (#9041)
|
||||
- Fix regression that broke use_secure_urls feature (#9052)
|
||||
|
||||
## Release 1.6.2
|
||||
|
||||
|
||||
@@ -815,6 +815,7 @@ $config['no_save_sent_messages'] = false;
|
||||
// Warning: This requires http server configuration. Sample:
|
||||
// RewriteRule ^/roundcubemail/[a-zA-Z0-9]{16}/(.*) /roundcubemail/$1 [PT]
|
||||
// Alias /roundcubemail /var/www/roundcubemail/
|
||||
// Warning: This feature does NOT work with request_path = 'SCRIPT_NAME'
|
||||
// Note: Use assets_path to not prevent the browser from caching assets
|
||||
$config['use_secure_urls'] = false;
|
||||
|
||||
|
||||
@@ -1171,7 +1171,7 @@ class rcmail extends rcube
|
||||
$path = $_SERVER[$path];
|
||||
}
|
||||
else if (empty($path)) {
|
||||
foreach (['REDIRECT_SCRIPT_URL', 'SCRIPT_NAME', 'REQUEST_URI'] as $name) {
|
||||
foreach (['REQUEST_URI', 'REDIRECT_SCRIPT_URL', 'SCRIPT_NAME'] as $name) {
|
||||
if (!empty($_SERVER[$name])) {
|
||||
$path = $_SERVER[$name];
|
||||
break;
|
||||
|
||||
@@ -120,8 +120,14 @@ class rcmail_oauth
|
||||
*/
|
||||
public function get_redirect_uri()
|
||||
{
|
||||
$url = $this->rcmail->url([], true, true);
|
||||
|
||||
// rewrite redirect URL to not contain query parameters because some providers do not support this
|
||||
return preg_replace('/\/?\?_task=[a-z]+/', '/index.php/login/oauth', $this->rcmail->url([], true, true));
|
||||
// also make sure to not duplicate the index.php/... path
|
||||
$url = preg_replace('/\?.*/', '', $url);
|
||||
$url = preg_replace('/index\.php.*$/', '', $url);
|
||||
|
||||
return slashify($url) . 'index.php/login/oauth';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user