Bug #21638

IP-lock not aware of IPv6

Added by Bas v.d. Wiel almost 10 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Locking / Session Handling
Target version:
-
Start date:
2010-08-06
Due date:
% Done:

100%

TYPO3 Version:
4.7
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

When locking a session to an IP with less than 4 parts, the core attempts to do IPv4 things to a potentially IPv6 address.

The attached patch adds a simple check for IPv6 addresses and keeps TYPO3 from wrongly assuming IPv4. It just returns the full IP, assuming this choice will lock the session to the individual address (reproducing the default strictest behaviour for IPv4).

The patch is against class.t3lib_userauth.php, being the first actual patch I ever contributed to another project.. please go easy on me if I did it wrong. ;-)
(issue imported from #M15379)

userauth_ipv6.patch View (239 Bytes) Administrator Admin, 2010-08-06 18:49

15379_v2.diff View (565 Bytes) Administrator Admin, 2010-08-08 12:50


Related issues

Related to TYPO3 Core - Feature #25336: Add support for IPv6 Closed 2011-03-16
Related to TYPO3 Core - Bug #89226: Removed IPlock properties are still assigned Closed 2019-09-23
Duplicated by TYPO3 Core - Bug #58699: IPv6 completely ignored by FE/BE lockIP Closed 2014-05-11
Duplicated by TYPO3 Core - Feature #62375: IPv6 session lock Closed 2014-10-21
Duplicated by TYPO3 Core - Bug #44109: ses_iplock IPv6 Closed 2012-12-19

Associated revisions

Revision 399bf83c (diff)
Added by Alexander Stehlik 11 months ago

[!!!][FEATURE] Add IP locking for IPv6

A new IpLocker class replaces the lock functionality in
AbstractUserAuthentication.

The new class is capable of locking to IPv4 and IPv6 addresses.

Resolves: #21638
Releases: master
Change-Id: I0075a9e49690e31c938abf7242c1f088c73bb37d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947
Reviewed-by: Benni Mack <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Markus Klein <>
Reviewed-by: Oliver Hader <>
Tested-by: TYPO3com <>
Tested-by: Markus Klein <>
Tested-by: Oliver Hader <>

History

#1 Updated by Steffen Gebert almost 10 years ago

Hi Bas,

thanks for your patch!
I created a unified diff of your changes, which is what we need for the review process.

Could you please check this and send it to the core-team mailinglist afterwards, to integrate it into the next release of TYPO3?

Please read http://typo3.org/teams/core/core-mailinglist-rules/ and use TYPO3 4-4 and trunk as affected branches.

Thanks
Steffen

#2 Updated by Bas v.d. Wiel almost 10 years ago

Hi Steffen,

Thanks for correcting my patch. I can see how it was done, so I'll stick to this procedure next time. Reading up on core list rules now..

Best regards,
Bas

#3 Updated by Susanne Moog almost 9 years ago

  • Status changed from Needs Feedback to Accepted
  • Target version deleted (0)
  • TYPO3 Version changed from 4.5 to 4.7
  • Complexity set to medium

#4 Updated by Markus Klein about 6 years ago

  • Priority changed from Should have to Must have
  • Is Regression set to No

#5 Updated by Mathias Schreiber over 5 years ago

  • Target version set to 7.4 (Backend)

#6 Updated by Susanne Moog almost 5 years ago

  • Target version changed from 7.4 (Backend) to 7.5

#7 Updated by Benni Mack over 4 years ago

  • Target version deleted (7.5)

#8 Updated by Gerrit Code Review about 3 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#9 Updated by Susanne Moog over 2 years ago

  • Category set to Locking / Session Handling

#10 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#11 Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#12 Updated by Gerrit Code Review over 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#13 Updated by Gerrit Code Review over 2 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#14 Updated by Gerrit Code Review over 2 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#15 Updated by Gerrit Code Review over 2 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#16 Updated by Gerrit Code Review almost 2 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#17 Updated by Gerrit Code Review almost 2 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#18 Updated by Gerrit Code Review almost 2 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#19 Updated by Gerrit Code Review almost 2 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#20 Updated by Gerrit Code Review almost 2 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#21 Updated by Gerrit Code Review over 1 year ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52947

#22 Updated by Gerrit Code Review about 1 year ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#23 Updated by Gerrit Code Review about 1 year ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#24 Updated by Gerrit Code Review 11 months ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#25 Updated by Gerrit Code Review 11 months ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#26 Updated by Gerrit Code Review 11 months ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#27 Updated by Gerrit Code Review 11 months ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#28 Updated by Gerrit Code Review 11 months ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#29 Updated by Gerrit Code Review 11 months ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#30 Updated by Gerrit Code Review 11 months ago

Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#31 Updated by Gerrit Code Review 11 months ago

Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#32 Updated by Gerrit Code Review 11 months ago

Patch set 24 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#33 Updated by Gerrit Code Review 11 months ago

Patch set 25 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#34 Updated by Gerrit Code Review 11 months ago

Patch set 26 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#35 Updated by Gerrit Code Review 11 months ago

Patch set 27 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#36 Updated by Gerrit Code Review 11 months ago

Patch set 28 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/52947

#37 Updated by Alexander Stehlik 11 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#38 Updated by Benni Mack 11 months ago

  • Status changed from Resolved to Closed

#39 Updated by Benni Mack 9 months ago

  • Related to Bug #89226: Removed IPlock properties are still assigned added

Also available in: Atom PDF