Skip to content

Remove link-local IPv6 address #6345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cookbook/configuration/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ The new environment is now accessible via::
aren't accessible, the front controller is usually protected from external
IP addresses via the following code at the top of the controller::

if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))) {
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) {
die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}

Expand Down
10 changes: 5 additions & 5 deletions cookbook/security/access_control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pattern so that it is only accessible by requests from the local server itself:
# ...
access_control:
#
- { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, fe80::1, ::1] }
- { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- { path: ^/internal, roles: ROLE_NO_ACCESS }

.. code-block:: xml
Expand All @@ -193,7 +193,7 @@ pattern so that it is only accessible by requests from the local server itself:
<!-- ... -->
<rule path="^/internal"
role="IS_AUTHENTICATED_ANONYMOUSLY"
ips="127.0.0.1, fe80::1, ::1"
ips="127.0.0.1, ::1"
/>

<rule path="^/internal" role="ROLE_NO_ACCESS" />
Expand All @@ -209,7 +209,7 @@ pattern so that it is only accessible by requests from the local server itself:
array(
'path' => '^/internal',
'role' => 'IS_AUTHENTICATED_ANONYMOUSLY',
'ips' => '127.0.0.1, fe80::1, ::1'
'ips' => '127.0.0.1, ::1'
),
array(
'path' => '^/internal',
Expand All @@ -230,8 +230,8 @@ the external IP address ``10.0.0.1``:
that does not match an existing role, it just serves as a trick to always
deny access).

But if the same request comes from ``127.0.0.1``, ``::1`` (the IPv6 loopback
address) or ``fe80::1`` (the IPv6 link-local address):
But if the same request comes from ``127.0.0.1`` or ``::1`` (the IPv6 loopback
address):

* Now, the first access control rule is enabled as both the ``path`` and the
``ip`` match: access is allowed as the user always has the
Expand Down