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

PHP warning qtranslate_core.php on line 183 #1202

Closed
Hr0bar opened this issue Jul 16, 2022 · 4 comments
Closed

PHP warning qtranslate_core.php on line 183 #1202

Hr0bar opened this issue Jul 16, 2022 · 4 comments
Labels
core Core functionalities, including the admin section

Comments

@Hr0bar
Copy link

Hr0bar commented Jul 16, 2022

Hi, using latest release, some bot/vulnerability scanner/scraper request triggered this:

PHP Warning: Undefined array key "host" in /opt/bitnami/wordpress/wp-content/plugins/qtranslate-xt/qtranslate_core.php on line 183', referer: /gbook.html

PHP 8.0.x

access log:
143.92.32.144 - - [16/Jul/2022:00:41:15 +0000] "GET /gbook.html HTTP/2.0" 404 126879

thanks for checking

@herrvigg herrvigg added the core Core functionalities, including the admin section label Jul 19, 2022
@herrvigg
Copy link
Collaborator

herrvigg commented Aug 7, 2022

Looks like a special case, possibly setting a wrong referrer. The host is derived from the origin, which should always be set.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer

Do you know more precisely how this happens? Can it be reproduced?

@herrvigg herrvigg added the need info The submitter must provide more info label Aug 7, 2022
@Hr0bar
Copy link
Author

Hr0bar commented Aug 7, 2022 via email

@herrvigg herrvigg removed the need info The submitter must provide more info label Aug 8, 2022
@herrvigg
Copy link
Collaborator

herrvigg commented Aug 8, 2022

OK added a new check, it doesn't cost much and it will be more robust.

@herrvigg
Copy link
Collaborator

herrvigg commented Sep 4, 2022

Fix released in 3.12.1.

@herrvigg herrvigg closed this as completed Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core functionalities, including the admin section
Projects
None yet
Development

No branches or pull requests

2 participants