Project

General

Profile

Actions

Bug #27294

closed

IPv6 Support for $TYPO3_CONF_VARS['FE']['IPmaskMountGroups'] broken

Added by Franz Vinzenz over 13 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2011-06-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In the File t3lib\class.t3lib_div.php on Line 802 in the function cmpIPv6($baseIP, $list) doesnt work correct.

There are 2 Problems.
1. ) There are only /48 and /64 Masks supported.
2.) It seems the function IPv6Hex2Bin doesnt work correct in conjunction with the substr. I think the third parameter is incorrect, as it means bytes instead of Bits.


My suggestion is instead oft he case to calculate the length oft he strings from the mask.

To support flexible Masks , instead of the function baseIPBin there schuold be used a function wich returns a String representation of the bits in zhe address. (string length = 128). so the substring function can use the value fo the mask.


In my opinion the call of self::IPv6Hex2Bin an be replaced with str_replace.

the followin code sequence could replace the entire
switch ($mask) { // test on /48 /64
block in the File t3lib\class.t3lib_div.php on Line 802 in the function cmpIPv6($baseIP, $list)

//-----------------------------------------------
if ($mask % 4) {
$success = FALSE;
} else {
$testBin = substr(str_replace(':', '', $test), 0, $mask / 4);
$baseIPBin = substr(str_replace(':', '', $baseIP), 0, $mask / 4);
$success = strcmp($testBin, $baseIPBin) == 0 ? TRUE : FALSE;
}


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #27210: t3lib_div::cmpIPv6() fails to compareClosedStefan Neufeind2011-06-04

Actions
Actions #1

Updated by Alexander Opitz over 10 years ago

  • Status changed from New to Needs Feedback
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5.35 or 6.2.4)?

Actions #2

Updated by Alexander Opitz almost 10 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF