A change was made to how tracking links work in Groundhogg 4.5 in order to make them more secure and avoid exploitation for a possible redirect attack.
Groundhogg tracking links work by first sending the visitor through your website so clicks can be recorded, and then redirecting them to the intended destination URL.
In Groundhogg ≤ 4.4, an attacker could theoretically modify the destination portion of a tracking URL and replace it with a different website. If the tracking system does not validate that the destination URL is legitimate, the tracking link could be abused to redirect visitors to phishing sites, malware, or other malicious content. Though there has been no evidence or instances of exploitation, we thought it prudent to close that issue.
This has been fixed in Groundhogg 4.5. For tracking links sent before the update, Groundhogg enforces a “safe redirect” only following URLs that point to the original sending domain.
If you would like to preserve the functionality of links to 3rd party domains in emails that were sent before updating to Groundhogg 4.5 use the following code snippet to add the hostnames of those URLs.
<?php
/**
* Allow additional hosts for wp_safe_redirect().
*/
add_filter( 'allowed_redirect_hosts', function ( $hosts ) {
$hosts[] = 'example.com';
$hosts[] = 'www.example.com';
// Add more hosts as needed.
$hosts[] = 'another-domain.com';
return array_unique( $hosts );
} );
Was this helpful?
Let us know if this document answered your question. That’s the only way we can improve.
