You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2021/04/07 21:05:22 UTC
[jena] branch main updated: Comment for LocalhostFilter
This is an automated email from the ASF dual-hosted git repository.
andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git
The following commit(s) were added to refs/heads/main by this push:
new 2865ad2 Comment for LocalhostFilter
2865ad2 is described below
commit 2865ad2d75e86501f4f287ca7c3dd74768a924a6
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Wed Apr 7 22:05:16 2021 +0100
Comment for LocalhostFilter
---
.../src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/jena-fuseki2/jena-fuseki-webapp/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java b/jena-fuseki2/jena-fuseki-webapp/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
index e637301..a8ae75f 100644
--- a/jena-fuseki2/jena-fuseki-webapp/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
+++ b/jena-fuseki2/jena-fuseki-webapp/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
@@ -53,8 +53,12 @@ public class LocalhostFilter extends AuthorizationFilter403 {
private static String LOCALHOST_IpV6_a = "[0:0:0:0:0:0:0:1]";
private static String LOCALHOST_IpV6_b = "0:0:0:0:0:0:0:1";
+ // This is what appears in the Chrome developer tools client-side.
+ // "[0:0:0:0:0:0:0:1]" by the time it arrives here, It is not clear which
+ // software component is responsible for that.
+ // To be safe we add "[::1]".
private static String LOCALHOST_IpV6_c = "[::1]";
- private static String LOCALHOST_IpV4 = "127.0.0.1"; // Strictly, 127.*.*.*
+ private static String LOCALHOST_IpV4 = "127.0.0.1"; // Strictly, 127.*.*.*
private static final Collection<String> localhosts = new HashSet<>(
Arrays.asList(LOCALHOST_IpV4, LOCALHOST_IpV6_a, LOCALHOST_IpV6_b, LOCALHOST_IpV6_c));