Project

General

Profile

« Previous | Next » 

Revision 1524

Added by Dietmar almost 13 years ago

View differences:

branches/2.8.x/CHANGELOG
13 13
=========================== add small Features 2.8.2 ==========================
14 14

  
15 15
----------------------------------- Fixes 2.8.2 --------------------------------
16
13 Nov-2011 Build 1524 Dietmar Woellbrink (Luisehahne)
17
! fix secureform was not updated
16 18
13 Nov-2011 Build 1523 Dietmar Woellbrink (Luisehahne)
17 19
# fix fingerprint in secureform 
18 20
! update jquery to version 1.7
branches/2.8.x/wb/admin/interface/version.php
52 52

  
53 53
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
54 54
if(!defined('VERSION')) define('VERSION', '2.8.2');
55
if(!defined('REVISION')) define('REVISION', '1523');
55
if(!defined('REVISION')) define('REVISION', '1524');
branches/2.8.x/wb/framework/SecureForm.php
83 83

  
84 84
	private function _generate_fingerprint()
85 85
	{
86
	// server depending values
87
 		$fingerprint  = ( isset($_SERVER['SERVER_SIGNATURE']) ) ? $_SERVER['SERVER_SIGNATURE'] : '2';
86
		// server depending values
87
		$fingerprint  = ( isset($_SERVER['SERVER_SIGNATURE']) ) ? $_SERVER['SERVER_SIGNATURE'] : '2';
88 88
		$fingerprint .= ( isset($_SERVER['SERVER_SOFTWARE']) ) ? $_SERVER['SERVER_SOFTWARE'] : '3';
89 89
		$fingerprint .= ( isset($_SERVER['SERVER_NAME']) ) ? $_SERVER['SERVER_NAME'] : '5';
90 90
		$fingerprint .= ( isset($_SERVER['SERVER_ADDR']) ) ? $_SERVER['SERVER_ADDR'] : '7';
91 91
		$fingerprint .= ( isset($_SERVER['SERVER_PORT']) ) ? $_SERVER['SERVER_PORT'] : '11';
92 92
		$fingerprint .= ( isset($_SERVER['SERVER_ADMIN']) ) ? $_SERVER['SERVER_ADMIN'] : '13';
93
		$fingerprint .= __FILE__;
93 94
		$fingerprint .= PHP_VERSION;
94
	// client depending values
95
		$fingerprint .= ( isset($_SERVER['HTTP_USER_AGENT']) ) ? $_SERVER['HTTP_USER_AGENT'] : '17';
95
		// client depending values
96
		$fingerprint .= ( isset($_SERVER['HTTP_USER_AGENT']) ) ? $_SERVER['HTTP_USER_AGENT'] : '19';
96 97
		$usedOctets = ( defined('FINGERPRINT_WITH_IP_OCTETS') ) ? (intval(FINGERPRINT_WITH_IP_OCTETS) % 5) : 2;
97 98
		$clientIp = ( isset($_SERVER['REMOTE_ADDR'])  ? $_SERVER['REMOTE_ADDR'] : '' );
98 99
		if(($clientIp != '') && ($usedOctets > 0)){
......
100 101
			while(sizeof($ip) > $usedOctets) { array_pop($ip); }
101 102
			$clientIp = implode('.', $ip);
102 103
		}else {
103
			$clientIp = 19;
104
			$clientIp = '23';
104 105
		}
105
		$fingerprint .= $clientIp;
106
		return md5($fingerprint);
106
		$fingerprint = md5($fingerprint.$clientIp);
107
		$lastDigit = hexdec($fingerprint[strlen($fingerprint)-1]);
108
		if ((hexdec($fingerprint[0]) + $lastDigit) == 16) {
109
			$fingerprint[strlen($fingerprint)-1] = dechex(($lastDigit + 6) % 16);
110
		}
111
		return $fingerprint;
107 112
	}
108 113

  
109 114
	private function _calcFtan($tanPart)

Also available in: Unified diff