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

Append one more possibility to the error message given for InvalidNonceReferrer #21391

Closed
atom-box opened this issue Oct 10, 2023 · 2 comments
Closed
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@atom-box
Copy link
Contributor

The error message is in the JSON table here plugins/Login/lang/en.json

Expected
"InvalidNonceReferrer": "The form security failed because of an invalid "Referer" header. If you are using a proxy server, you must %1$sconfigure Matomo to accept the proxy header%2$s that forwards the host header. Also, check that your "Referer" header is sent correctly. If you previously connected using HTTPS, please ensure you are connecting over a secure (SSL/TLS) connection and try again. Also check that allowedReferrerHost is not NULL"

Actual
"InvalidNonceReferrer": "The form security failed because of an invalid "Referer" header. If you are using a proxy server, you must %1$sconfigure Matomo to accept the proxy header%2$s that forwards the host header. Also, check that your "Referer" header is sent correctly. If you previously connected using HTTPS, please ensure you are connecting over a secure (SSL/TLS) connection and try again."

@atom-box atom-box added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member labels Oct 10, 2023
@atom-box
Copy link
Contributor Author

This is in response to the following user email:

(The error message for InvalidNonceReferrer) tells me the Referrer is not set correctly, but var_dump shows it set just perfectly. The real problem is that allowedReferrerHost is NULL and it's very unclear where allowedReferrerHost is supposed to be configured.

I traced this back to Nonce.php where it appears to be triggered by $allowedReferrerhost being NULL. $referrer is set correctly to "https://s.wanwire.com".

(I managed to get around it, but the error message is both incorrect and unhelpful.)

@sgiehl
Copy link
Member

sgiehl commented Oct 10, 2023

I don't think this addition will bring any benefit to the (end) users, as they wouldn't be able to change anything. The allowedReferrerHost is provided in the code and null is actually valid.
If there is a specific problem where that check fails we should look at that place.

@sgiehl sgiehl closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2023
@sgiehl sgiehl added wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it. and removed Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. To Triage An issue awaiting triage by a Matomo core team member labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants