diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java
index 64196c1968..20409b7ce6 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClientBase.java
@@ -915,9 +915,10 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
if (outs == null)
return;
Writer out = new BufferedWriter(new OutputStreamWriter(outs, "UTF-8"));
- out.write(errMessage);
if (targetRequest != null) {
String uri = DataHelper.escapeHTML(targetRequest);
+ errMessage = errMessage.replace("", "");
+ out.write(errMessage);
out.write("");
@@ -982,6 +983,8 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
out.write("\n");
}
}
+ } else {
+ out.write(errMessage);
}
out.write("\n");
writeFooter(out);
diff --git a/installer/resources/proxy/ahelper-conflict-header.ht b/installer/resources/proxy/ahelper-conflict-header.ht
index 20a66e4999..6976d99f81 100644
--- a/installer/resources/proxy/ahelper-conflict-header.ht
+++ b/installer/resources/proxy/ahelper-conflict-header.ht
@@ -4,6 +4,10 @@ Referrer-Policy: no-referrer
Cache-Control: no-cache
Connection: close
Proxy-Connection: close
+X-XSS-Protection: 1; mode=block
+X-Content-Type-Options: nosniff
+Referrer-Policy: no-referrer
+Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p
diff --git a/installer/resources/proxy/ahelper-new-header.ht b/installer/resources/proxy/ahelper-new-header.ht
index 613e1041ce..11916962a7 100644
--- a/installer/resources/proxy/ahelper-new-header.ht
+++ b/installer/resources/proxy/ahelper-new-header.ht
@@ -4,6 +4,10 @@ Referrer-Policy: no-referrer
Cache-Control: no-cache
Connection: close
Proxy-Connection: close
+X-XSS-Protection: 1; mode=block
+X-Content-Type-Options: nosniff
+Referrer-Policy: no-referrer
+Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p
diff --git a/installer/resources/proxy/ahelper-notfound-header.ht b/installer/resources/proxy/ahelper-notfound-header.ht
index 733e0b6000..8ef7d66f08 100644
--- a/installer/resources/proxy/ahelper-notfound-header.ht
+++ b/installer/resources/proxy/ahelper-notfound-header.ht
@@ -3,6 +3,10 @@ Content-Type: text/html; charset=UTF-8
Cache-Control: no-cache
Connection: close
Proxy-Connection: close
+X-XSS-Protection: 1; mode=block
+X-Content-Type-Options: nosniff
+Referrer-Policy: no-referrer
+Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p
diff --git a/installer/resources/proxy/auth-header.ht b/installer/resources/proxy/auth-header.ht
index 296ab68889..a2605dfab2 100644
--- a/installer/resources/proxy/auth-header.ht
+++ b/installer/resources/proxy/auth-header.ht
@@ -5,6 +5,10 @@ Proxy-Authenticate: Basic realm="I2P HTTP Proxy"
Cache-Control: no-cache
Connection: close
Proxy-Connection: close
+X-XSS-Protection: 1; mode=block
+X-Content-Type-Options: nosniff
+Referrer-Policy: no-referrer
+Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p
diff --git a/installer/resources/proxy/b32-auth-header.ht b/installer/resources/proxy/b32-auth-header.ht
index d95ece44ce..6ab6f34c74 100644
--- a/installer/resources/proxy/b32-auth-header.ht
+++ b/installer/resources/proxy/b32-auth-header.ht
@@ -3,11 +3,14 @@ Content-Type: text/html; charset=UTF-8
Cache-Control: no-cache
Connection: close
Proxy-Connection: close
+X-XSS-Protection: 1; mode=block
+X-Content-Type-Options: nosniff
+Referrer-Policy: no-referrer
+Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p
_("The website was not reachable.")
_("The website is offline, there is network congestion, or your router is not yet well-integrated with peers.")
-_("You may want to {0}retry{1}.", "", "")
-
+_("You may want to {0}retry{1}.", "", "")
_("Could not find the following destination:")
diff --git a/installer/resources/proxy/dnfb-header.ht b/installer/resources/proxy/dnfb-header.ht
index 0da163c68a..2b8a826502 100644
--- a/installer/resources/proxy/dnfb-header.ht
+++ b/installer/resources/proxy/dnfb-header.ht
@@ -3,11 +3,14 @@ Content-Type: text/html; charset=UTF-8
Cache-Control: no-cache
Connection: close
Proxy-Connection: close
+X-XSS-Protection: 1; mode=block
+X-Content-Type-Options: nosniff
+Referrer-Policy: no-referrer
+Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p
_("Could not find the following destination:")
diff --git a/installer/resources/proxy/dnfh-header.ht b/installer/resources/proxy/dnfh-header.ht index 9b9f29a0aa..3ad17dd082 100644 --- a/installer/resources/proxy/dnfh-header.ht +++ b/installer/resources/proxy/dnfh-header.ht @@ -4,6 +4,10 @@ Referrer-Policy: no-referrer Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p diff --git a/installer/resources/proxy/dnfp-header.ht b/installer/resources/proxy/dnfp-header.ht index 213fce5d8a..f567e049dd 100644 --- a/installer/resources/proxy/dnfp-header.ht +++ b/installer/resources/proxy/dnfp-header.ht @@ -3,12 +3,15 @@ Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p - + -_("The HTTP Outproxy was not found.") _("It is offline, there is network congestion, or your router is not yet well-integrated with peers.") -_("You may want to {0}retry{1} as this will randomly reselect an outproxy from the pool you have defined {2}here{3} (if you have more than one configured).", "", "", "", "") - +_("You may want to {0}retry{1} as this will randomly reselect an outproxy from the pool you have defined {2}here{3} (if you have more than one configured).", "", "", "", "") _("If you continue to have trouble you may want to edit your outproxy list {0}here{1}.", "", "")
_("Could not find the following destination:")
diff --git a/installer/resources/proxy/enc-header.ht b/installer/resources/proxy/enc-header.ht index 882ea9427c..a3283ba2e7 100644 --- a/installer/resources/proxy/enc-header.ht +++ b/installer/resources/proxy/enc-header.ht @@ -3,6 +3,10 @@ Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p diff --git a/installer/resources/proxy/encp-header.ht b/installer/resources/proxy/encp-header.ht index d50cd7857f..ed636add82 100644 --- a/installer/resources/proxy/encp-header.ht +++ b/installer/resources/proxy/encp-header.ht @@ -3,11 +3,14 @@ Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p -_("The HTTP outproxy was not reachable, because it uses encryption options that are not supported by your I2P or Java version.") -_("You may want to {0}retry{1} as this will randomly reselect an outproxy from the pool you have defined {2}here{3} (if you have more than one configured).", "", "", "", "") - +_("You may want to {0}retry{1} as this will randomly reselect an outproxy from the pool you have defined {2}here{3} (if you have more than one configured).", "", "", "", "") _("If you continue to have trouble you may want to edit your outproxy list {0}here{1}.", "", "")
_("Could not connect to the following destination:")
diff --git a/installer/resources/proxy/localhost-header.ht b/installer/resources/proxy/localhost-header.ht index 9fccbaefb0..bec436a738 100644 --- a/installer/resources/proxy/localhost-header.ht +++ b/installer/resources/proxy/localhost-header.ht @@ -3,6 +3,10 @@ Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p diff --git a/installer/resources/proxy/nols-header.ht b/installer/resources/proxy/nols-header.ht index 561a24cd7c..8d85bbe836 100644 --- a/installer/resources/proxy/nols-header.ht +++ b/installer/resources/proxy/nols-header.ht @@ -3,11 +3,14 @@ Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p -_("The website was not reachable, because its lease set was not found.") _("The website is probably down, but there could also be network congestion.") -_("You may want to {0}retry{1}.", "", "") -
+_("You may want to {0}retry{1}.", "", "")_("Could not find the following destination:") diff --git a/installer/resources/proxy/nolsp-header.ht b/installer/resources/proxy/nolsp-header.ht index 11580fb32c..bf5ab3a291 100644 --- a/installer/resources/proxy/nolsp-header.ht +++ b/installer/resources/proxy/nolsp-header.ht @@ -3,11 +3,14 @@ Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p
-_("The HTTP outproxy was not reachable, because its lease set was not found.") _("The outproxy is probably down, but there could also be network congestion.") -_("You may want to {0}retry{1} as this will randomly reselect an outproxy from the pool you have defined {2}here{3} (if you have more than one configured).", "", "", "", "") - +_("You may want to {0}retry{1} as this will randomly reselect an outproxy from the pool you have defined {2}here{3} (if you have more than one configured).", "", "", "", "") _("If you continue to have trouble you may want to edit your outproxy list {0}here{1}.", "", "")
_("Could not find the following destination:")
diff --git a/installer/resources/proxy/noproxy-header.ht b/installer/resources/proxy/noproxy-header.ht index c68b28ffe3..a7cb9b5b37 100644 --- a/installer/resources/proxy/noproxy-header.ht +++ b/installer/resources/proxy/noproxy-header.ht @@ -3,6 +3,10 @@ Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p diff --git a/installer/resources/proxy/protocol-header.ht b/installer/resources/proxy/protocol-header.ht index c685b40065..124d66b53f 100644 --- a/installer/resources/proxy/protocol-header.ht +++ b/installer/resources/proxy/protocol-header.ht @@ -3,6 +3,10 @@ Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p diff --git a/installer/resources/proxy/reset-header.ht b/installer/resources/proxy/reset-header.ht index 4ed5211791..2d3c5cfff9 100644 --- a/installer/resources/proxy/reset-header.ht +++ b/installer/resources/proxy/reset-header.ht @@ -3,11 +3,14 @@ Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p -_("The connection to the website was reset while the page was loading.") _("The website could be temporarily unavailable, too busy, or it has blocked your access.") -_("You may want to {0}retry{1}.", "", "") -
+_("You may want to {0}retry{1}.", "", "")_("Could not find the following destination:") diff --git a/installer/resources/proxy/resetp-header.ht b/installer/resources/proxy/resetp-header.ht index fc6ca71861..23a22ce164 100644 --- a/installer/resources/proxy/resetp-header.ht +++ b/installer/resources/proxy/resetp-header.ht @@ -1,13 +1,16 @@ - TTP/1.1 403 Connection Reset +HTTP/1.1 403 Connection Reset Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache Connection: close Proxy-Connection: close +X-XSS-Protection: 1; mode=block +X-Content-Type-Options: nosniff +Referrer-Policy: no-referrer +Content-Security-Policy: default-src 'none'; style-src 'self' 'unsafe-inline' http://proxy.i2p; form-action 'self' http://proxy.i2p; frame-ancestors 'self' http://127.0.0.1:7657/; img-src http://proxy.i2p
_("The connection to the proxy was reset.") _("The proxy could be temporarily unavailable, too busy, or it has blocked your access.") -_("You may want to {0}retry{1} as this will randomly reselect an outproxy from the pool you have defined {2}here{3} (if you have more than one configured).", "", "", "", "") - +_("You may want to {0}retry{1} as this will randomly reselect an outproxy from the pool you have defined {2}here{3} (if you have more than one configured).", "", "", "", "") _("If you continue to have trouble you may want to edit your outproxy list {0}here{1}.", "", "")