Willkommen Gast. Bitte Einloggen oder Registrieren
 
Sprache wählen:
 
  Last Script Version: 20

  ÜbersichtHilfeSuchenEinloggenRegistrieren  
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken
[resolved] https bug (Gelesen: 3765 mal)
Sandro kensan
YaBB Newbies
*
Offline



Beiträge: 39
[resolved] https bug
14.12.17 um 10:58:47
 
track.php does not deal correctly https in statistics. sitename detection and referer detection are broken when the web page are:

https://www.kensan.it/articoli/Telnet.php

see this two PHPwebstat stats picture whit the bug and with the bug correct:

...

where SITE is www.kensan.it/articoli/Telnet.php and REFERER is https://www.kensan.it/articoli/Telnet.php.

...

where SITE is articoli/Telnet.php and REFERER is the same and is in black color.

The https bug is in the track.php file and in sitename detection and referer detection section:

Code (PHP):
####################################################################
### sitename detection ###

$temp_site_name   = substr ( strstr ( substr ( $js_url , 8 ) , "/" ) , 1 ); 



Code (PHP):
####################################################################
### referer detection ###

substr ( $js_referer , 0 , strpos ( $js_referer."/" , "/" , 8 ) )

substr ( strstr ( substr ( $js_referer , 8 ) , "/" ) , 1 ) 



The bug is that "http://" has 7 chars but "https://" has 8 chars, in the original track.php the numbers are 7, in the above track.php the numbers are 8 and are correct fot https sites. For http sites the number correct is 7.

So for correct the bug it neded to change track.php with the code:

Code (PHP):
  //------------------------------------------------------------------
  // SSL Fix by www.kensan.it Sandro kensan
  if ( $_SERVER [ "HTTPS" ] == "on" ) {
    $len_http = strlen("https://");
  }else{
    $len_http = strlen("http://");
  }
  //------------------------------------------------------------------
####################################################################
### sitename detection ###

$temp_site_name   = substr ( strstr ( substr ( $js_url , $len_http ) , "/" ) , 1 );

####################################################################
### referer detection ###

substr ( $js_referer , 0 , strpos ( $js_referer."/" , "/" , $len_http ) )

substr ( strstr ( substr ( $js_referer , $len_http ) , "/" ) , 1 )
 

Zum Seitenanfang
 
Homepage  
IP gespeichert
 
deksar
YaBB Newbies
*
Offline



Beiträge: 9
Re: [resolved] https bug
Antwort #1 - 17.10.20 um 10:30:39
 
Is this fixed with the latest one already, or we should do that manual edit?
Thanks.
Zum Seitenanfang
 
 
IP gespeichert
 
Holger
Administrator
*****
Offline



Beiträge: 2298
Germany NRW
Geschlecht: male
Re: [resolved] https bug
Antwort #2 - 24.10.20 um 07:18:00
 
Your version is already over 2 years old. It is implemented differently in the latest version.
Zum Seitenanfang
 

... ... ...
Homepage  
IP gespeichert
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken