@gerard76 opened this Issue on October 8th 2020

I added symlinks to matomo.js and matomo.php because matomo is a keyword that is blocked by some blockers.

File integrity is correct in pointing out they should not be there, but the solution it proposes is wrong.

Screenshot 2020-10-08 at 13 56 40

Matomo 3.14.1

2020-10-10 - edit fixed typo

@tsteur commented on October 8th 2020 Member

Hi @gerard76

I think this is actually expected behaviour and the solution be to mark these files as "to be ignored" by creating a file config/config.php like with content like this:

return array(
    'fileintegrity.ignore' => DI\add(array(

If someone else can confirm this is expected behaviour then this could be put in an FAQ.

@Findus23 commented on October 8th 2020 Member

I think the bug reported isn't that those files are shown, but that the check recommends deleting the original files instead of the "incorrect" symlinks.

If someone wants to fix this, they are welcome to submit a Pull Request.

@tsteur commented on October 8th 2020 Member

👍 didn't notice there was a different message. For this particular case it would actually remove those files by adding the config but of course the actual bug remains which is the use of realpath in https://github.com/matomo-org/matomo/blob/4.0.0-b2/core/FileIntegrity.php#L75

@aureq commented on October 9th 2020

Hi @gerard76 Instead of using symlinks, may I suggest you to use aliasing instead? This way you won't need any symlinks and you should be able to achieve what you want.

@gerard76 commented on October 10th 2020

Sure you may. I have no problems with the symlinks though. Just reporting a bug.

@narfk commented on November 26th 2020
Another solution (Apache, .htaccess)

<IfModule rewrite_module>
    RewriteEngine On
    RewriteRule ^/w.(js|php)$ /piwik/piwik.$1 [NC,L]
Powered by GitHub Issue Mirror