systopia / CiviProxy

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

Proxy Extension in multi Language environments #72

Open pbatroff opened 5 months ago

pbatroff commented 5 months ago

In the mend_url function, the system URL is produced via CRM_Core_Config::singleton()->userFrameworkBaseURL, see here.

This can fail in multilanguage systems, where the base URL is https://my-domain.com/, but the system outputs https://my-domain.com/de. Uploaded Images though are added without the language prefix, e.g.: https://my-domain.com/sites/default/files/civicrm/persist/contribute/images/uploads/static/1000px_MarvelLogo_svg_5537554aaff96c158d7169818940fdcb.png

This leads to no replacements and invalid pictures on the client side, if civicrm isn't accessible directly

edit This was on drupal 7

pbatroff commented 5 months ago

I successfully tested this by replacing the systemURL with this:

$system_base = \Civi::paths()->getVariable('cms.root', 'url');

Need to verify this