Problem: 404 monitor sends UserAgent to external Website! (api.redirect.li)
-
Hi,
I recently wondered, why my log file is filled with PHP notices like this:
Trying to access array offset on value of type bool in 404-monitor/class-monitor.php on line 187
.I investigated and found a really strange method called
parse_user_agent( $u_agent )
in class-monitor.php.What’s strange about it?
This method sends data to an unknown external website. (if a 404 error is detected and UserAgent is found)
The method’s DocBlock says… “Parses a user-agent string into its parts.” The DocBlock also says, that this method uses a project called “
https://github.com/donatj/PhpUserAgent
“. This project should parse the UserAgent on the server. (I not further looked into this project yet.)The reality: The method doesn’t use this GitHub project. Instead it makes an EXTERNAL API CALL to
https://api.redirect.li/v1/useragent/
. and sends the UserAgent, if a 404 error is detected and UserAgent is found.Here is the code in class-monitor.php: (Line 182)
$response = wp_remote_get( 'https://api.redirect.li/v1/useragent/' . urlencode( $u_agent ) );
About the external api site.
The api.redirect.li site is registered in Liechtenstein (Europe) by a company or single person from the UK (London).
Api call intended?
Is this implementation really intended? For me it looks like it should use the “PhpUserAgent” GitHub project on the server, and the API call is some kind of development left-over?
Best,
Andreas- This topic was modified 3 years, 11 months ago by .
- This topic was modified 3 years, 11 months ago by .
- This topic was modified 3 years, 11 months ago by .
- This topic was modified 3 years, 11 months ago by .
- This topic was modified 3 years, 11 months ago by .
- This topic was modified 3 years, 11 months ago by .
- This topic was modified 3 years, 11 months ago by .
- The topic ‘Problem: 404 monitor sends UserAgent to external Website! (api.redirect.li)’ is closed to new replies.