systopia / CiviProxy

A security proxy for CiviCRM
GNU Affero General Public License v3.0
7 stars 18 forks source link

Fix for skipping 'open.php' replacement in non standard drupal install #58

Open kainuk opened 2 years ago

kainuk commented 2 years ago

Before

Urls with extern/open.php are not replaced when civicrm is not installed in the sites/all/modules directory. The effects is that open clicks are not sent not to the proxy server but but direct to civicrm and lost.

After.

The urls are replaced.

Technical

Background

What this bug makes a bit complicated to find is that a tester often has direct access to the civicrm installation, so his click registers.

bjendres commented 2 years ago

Thanks @kainuk! @jensschuppe does this look good to you?

jensschuppe commented 2 years ago

I'm unfamiliar with what this code actually does, but using CMS-independent URLs seems very reasonable. There's also a sites/default/files thing in there. Should this also be replaced, @kainuk?

kainuk commented 2 years ago

The code replaces an URL that leads to CiviCRM with one that leads to the Proxy

Replacing sites/default/files makes sense because that works only for drupal. Not sure it that's enough to make in CMS independent. This PR solves a problem for a Drupal customer.