Dotclear

Ticket #584 (new defect)

Opened 12 years ago

Doesn't add /index.php if the url ends with *.php

Reported by: ploum Owned by: olivier
Priority: normal Component: plugin:piwik
Severity: normal Keywords:
Cc:

Description

Je voudrais juste proposer ce petit changement au plugin piwik.

Fichier class.dc.piwik.php, ligne 108, remplacer:

Code:

if (!preg_match('/index\.php$/',$base)) {

par

Code:

if (!preg_match('/(.*)\.php$/',$base)) {

La raison: si l'ulisateur a fourni une adresse qui se termine par xxx.php, il y a de très très fortes chances que rajouter index.php pour faire xxx.php/index.php soit faux.

De plus, cela permet justement d'utiliser autre chose que index.php pour accéder à Piwik (exemple vécu : l'accès à index.php est protégé depuis le htaccess, l'accès à l'api se faisant depuis tokenauth.php)'

Note: See TracTickets for help on using tickets.

Sites map