Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain with umlauts #13896

Closed
schousda opened this issue Dec 21, 2018 · 3 comments
Closed

Domain with umlauts #13896

schousda opened this issue Dec 21, 2018 · 3 comments
Labels
worksforme The issue cannot be reproduced and things work as intended.

Comments

@schousda
Copy link

Hello,

if i add a domain with german umlauts, like "ä", "ö" or "ü" to my matomo configuration, i can't access the login.
I have to add the punycode domain to my settings to make it work.

Warnung: Sie betreten Matomo aktuell von https://a.domäne.de/, allerdings wurde Matomo so konfiguriert, dass es unter dieser Adresse läuft: https://a.domain.de/.

Hier klicken um Matomo sicher zu betreten und die Warnung zu entfernen. Zusätzlich können Sie den Matomo Administrator kontaktieren und ihn auf dieses Problem hinweisen ().

How do I fix this problem and how do I login again?
The Matomo Super User can manually edit the file piwik/config/config.ini.php and add the following lines:

[General]
trusted_hosts[] = "domäne.de"

After making the change, you will be able to login again.

You may also disable this security feature (not recommended). To do so edit config/config.ini.php and add:

[General]
enable_trusted_host_check=0
@tsteur
Copy link
Member

tsteur commented Dec 23, 2018

Unfortunately my local server doesn't support umlauts in the domain so I cannot fully reproduce. I still debugged Matomo though and how we read the trusted hosts configuration and there everything should be all fine.

In case you can access your Matomo instance on the server, can you for a one time test change this line?
https://github.com/matomo-org/matomo/blob/3.8.0-b5/core/Url.php#L211
from $host = @$_SERVER['HTTP_HOST']; to $host = @$_SERVER['HTTP_HOST'];var_export($host);exit;?
And then reload the page... Make sure to undo the change afterwards. Could you send us the output of that?

@Findus23
Copy link
Member

That's interesting because for me it is working fine.
I added 127.0.0.15 äöü-test.matomo to /etc/hosts and curl couldn't connect:

$ curl http://äöü-test.matomo -v
* Could not resolve host: xn---test-fra0kzb.matomo
* Closing connection 0
curl: (6) Could not resolve host: xn---test-fra0kzb.matomo

So I know that xn---test-fra0kzb.matomo was the punycode and added it to /etc/hosts and DNS was working fine.
I also added the punycode (not the umlaut domain) to server_name in the nginx config.
Afterwards Matomo loaded correctly and suggested adding the punycode to the config.
grafik
(unrelated, but after 3.7.0. that screen looks a bit ugly)

After adding it Matomo works as it should.

@tsteur
Copy link
Member

tsteur commented Dec 30, 2018

@schousda I'll close the issue for now as it seems to work, but feel free to comment and reopen if you still experience the issue and ideally give us the output of the HOST entry mentioned above.

@tsteur tsteur closed this as completed Dec 30, 2018
@tsteur tsteur added the worksforme The issue cannot be reproduced and things work as intended. label Dec 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants