ojsde / shariff

The Shariff plugin adds social media buttons to the website without compromising the privacy of website users, using Shariff (https://github.com/heiseonline/shariff) solution.
GNU General Public License v3.0
9 stars 16 forks source link

base_url override settings ignored #2

Closed klausru closed 3 years ago

klausru commented 7 years ago

Dear Božana Bokan

it seems that the plugin ignores the base_url override settings declared in config.inc.php

I`m using the plugin on www.medienpaed.com and the URLs contain the install path, which should not be shown due to the base_url override settings. Maybe the problem is the construction of the URLs via $requestedUrl and getCompleteUrl() . Are there any workarounds or alternative methods to contruct the URL?

Thanks

bozana commented 7 years ago

Hi @klausru, thanks a lot for reporting this -- I will try to fix it...

klausru commented 7 years ago

Thanks for having a look at it. As a quick and dirty workaround I replaced the $requestedUrl in ShariffBlockPlugin.inc.php by: $currentUrl = "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; and called that with data-url="{$currentUrl|escape}"> in the /templates/shariffBlock.tpl Although it works, I do not know whether this might cause security problems.