"system": {
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"scvnextcloud01:8443",
"name.domain.com"
],
"dbtype": "mysql",
"version": "34.0.1.2",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"skeletondirectory": "",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"memcache.local": "\\OC\\Memcache\\APCu",
"filelocking.enabled": true,
"upgrade.disable-web": true,
"maintenance": false,
"app_install_overwrite": [],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"mail_sendmailmode": "smtp",
"mail_smtpstreamoptions": {
"ssl": {
"allow_self_signed": false,
"verify_peer": true,
"verify_peer_name": true
}
},
"forbidden_filename_basenames": [
"con",
"prn",
"aux",
"nul",
"com0",
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"com\u00b9",
"com\u00b2",
"com\u00b3",
"lpt0",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"lpt\u00b9",
"lpt\u00b2",
"lpt\u00b3"
],
"forbidden_filename_characters": [
"<",
">",
":",
"\"",
"|",
"?",
"*",
"\\",
"\/"
],
"forbidden_filename_extensions": [
" ",
".",
".filepart",
".part"
],
"twofactor_enforced": "true",
"twofactor_enforced_groups": [
"guest_app",
"admin",
"Extern",
"Pankl"
],
"twofactor_enforced_excluded_groups": [],
"maintenance_window_start": 2,
"serverid": "0",
"default_phone_region": "AT",
"default_language": "en",
"default_timezone": "Europe\/Vienna",
"default_locale": "en_AT",
"loglevel": 2,
"overwritehost": "name.domain.com",
"overwriteprotocol": "https",
"overwrite.cli.url": "https:\/\/name.domain.com"
}
}
Since I had a double URL I searched where this is generated.
Which is: **/opt/nextcloud/config/www/nextcloud/apps/user_saml/lib/AlternativeLogin/AlternativeLoginProvider.php
I have no deep knowledge of php. But what happens at $absoluteRedirectUrl seems to generate the double URL for me. Also I noticed without this part the URL from myapps would fail and only direct to the loginpage. But the SSO from the loginpage would work as expected when I get the Entra ID logon.
I am just really wondering if this is an actual bug or a config mistake.
I checked the logs if I found anything relevant to that. But it seems literally just this one URL generating thing.
How to use GitHub
Steps to reproduce
1.Configure SAML and keep the loginpage enabled.
2.Login with MS Entra ID Button => https://name.domain.com/apps/user_saml/saml/login?idp=1&method=get&originalUrl=https://name.domain.com/https://name.domain.com/&requesttoken=
3.Get redirected to double URL. Obviously the space https://name.domain.com/ does not exist. And it requests to go back. But this causes issues for the Nextcloud app.
Expected behaviour
Tell us what should happen
The loginpage should direct to the correct URL https://name.domain.com/ when using Microsoft Entra ID.
Actual behaviour
Tell us what happens instead, if possible also add a screenshot
It does in fact direct towards https://name.domain.com/https://name.domain.com/.
I noticed that the button already generates the incorrect URL: https://name.domain.com/apps/user_saml/saml/login?idp=1&method=get&originalUrl=https://name.domain.com/https://name.domain.com/&requesttoken=
Server configuration
Web server: Nginx
Database: MariaDB
PHP version: 8.4.16
Nextcloud version: 34.0.1
List of activated apps
root@c10df333dab1:/# occ app:list
Enabled:
Disabled:
Browser
Browser name: Firefox/Edge
Browser version: 140.12.0esr/150.0.4078.83
Operating system: Windows
Workaround: (from my post https://help.nextcloud.com/t/double-url-with-saml-app-azure-loginpage-wrong-redirect/247252)
It was suggested to me to open this issue on github. Carlschwan is already on it as far as I gathered.
Since I had a double URL I searched where this is generated.
Which is: **/opt/nextcloud/config/www/nextcloud/apps/user_saml/lib/AlternativeLogin/AlternativeLoginProvider.php
Specifically this part:
I changed to
I have no deep knowledge of php. But what happens at $absoluteRedirectUrl seems to generate the double URL for me. Also I noticed without this part the URL from myapps would fail and only direct to the loginpage. But the SSO from the loginpage would work as expected when I get the Entra ID logon.
I am just really wondering if this is an actual bug or a config mistake.
I checked the logs if I found anything relevant to that. But it seems literally just this one URL generating thing.