forked from I2P_Developers/i2p.i2p
Debian: Patch refresh
This commit is contained in:
@ -35,7 +35,7 @@ diff --git a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.
|
|||||||
index 31261e3de..374df3bd2 100644
|
index 31261e3de..374df3bd2 100644
|
||||||
--- a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java
|
--- a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java
|
||||||
+++ b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java
|
+++ b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java
|
||||||
@@ -1100,8 +1100,8 @@ public class RouterConsoleRunner implements RouterApp {
|
@@ -1109,8 +1109,8 @@ public class RouterConsoleRunner implements RouterApp {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -45,4 +45,4 @@ index 31261e3de..374df3bd2 100644
|
|||||||
+ UserIdentity rv = super.login(username, credentials);
|
+ UserIdentity rv = super.login(username, credentials);
|
||||||
if (rv == null)
|
if (rv == null)
|
||||||
//_log.logAlways(net.i2p.util.Log.WARN, "Console authentication failed, webapp: " + _webapp + ", user: " + username);
|
//_log.logAlways(net.i2p.util.Log.WARN, "Console authentication failed, webapp: " + _webapp + ", user: " + username);
|
||||||
_log.logAlways(net.i2p.util.Log.WARN, "Console authentication failed, user: " + username);
|
_log.logAlways(net.i2p.util.Log.WARN, "Console authentication failed, user: " + username + " IP: " + request.getRemoteAddr());
|
||||||
|
24
debian/patches/0002-jetty-compatibility.patch
vendored
24
debian/patches/0002-jetty-compatibility.patch
vendored
@ -30,28 +30,28 @@
|
|||||||
import org.eclipse.jetty.security.ConstraintMapping;
|
import org.eclipse.jetty.security.ConstraintMapping;
|
||||||
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
||||||
+import org.eclipse.jetty.security.UserStore;
|
+import org.eclipse.jetty.security.UserStore;
|
||||||
|
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
|
||||||
import org.eclipse.jetty.security.authentication.DigestAuthenticator;
|
import org.eclipse.jetty.security.authentication.DigestAuthenticator;
|
||||||
import org.eclipse.jetty.server.AbstractConnector;
|
import org.eclipse.jetty.security.authentication.LoginAuthenticator;
|
||||||
import org.eclipse.jetty.server.ConnectionFactory;
|
@@ -994,6 +998,8 @@
|
||||||
@@ -987,6 +989,8 @@
|
String rlm = isBasic ? PROMETHEUS_REALM : JETTY_REALM;
|
||||||
} else {
|
HashLoginService realm = new CustomHashLoginService(rlm, context.getContextPath(),
|
||||||
HashLoginService realm = new CustomHashLoginService(JETTY_REALM, context.getContextPath(),
|
|
||||||
ctx.logManager().getLog(RouterConsoleRunner.class));
|
ctx.logManager().getLog(RouterConsoleRunner.class));
|
||||||
+ UserStore userStore = new UserStore();
|
+ UserStore userStore = new UserStore();
|
||||||
+ realm.setUserStore(userStore);
|
+ realm.setUserStore(userStore);
|
||||||
sec.setLoginService(realm);
|
sec.setLoginService(realm);
|
||||||
sec.setAuthenticator(authenticator);
|
LoginAuthenticator auth = isBasic ? basicAuthenticator : authenticator;
|
||||||
String[] role = new String[] {JETTY_ROLE};
|
sec.setAuthenticator(auth);
|
||||||
@@ -994,7 +998,7 @@
|
@@ -1003,7 +1007,7 @@
|
||||||
String user = e.getKey();
|
|
||||||
String pw = e.getValue();
|
String pw = e.getValue();
|
||||||
Credential cred = Credential.getCredential(MD5_CREDENTIAL_TYPE + pw);
|
// for basic, the password will be the md5 hash itself
|
||||||
|
Credential cred = Credential.getCredential(isBasic ? pw : MD5_CREDENTIAL_TYPE + pw);
|
||||||
- realm.putUser(user, cred, role);
|
- realm.putUser(user, cred, role);
|
||||||
+ userStore.addUser(user, cred, role);
|
+ userStore.addUser(user, cred, role);
|
||||||
Constraint constraint = new Constraint(user, JETTY_ROLE);
|
Constraint constraint = new Constraint(user, JETTY_ROLE);
|
||||||
constraint.setAuthenticate(true);
|
constraint.setAuthenticate(true);
|
||||||
ConstraintMapping cm = new ConstraintMapping();
|
ConstraintMapping cm = new ConstraintMapping();
|
||||||
@@ -1014,7 +1018,7 @@
|
@@ -1023,7 +1027,7 @@
|
||||||
try {
|
try {
|
||||||
// each char truncated to 8 bytes
|
// each char truncated to 8 bytes
|
||||||
String user2 = new String(b2, "ISO-8859-1");
|
String user2 = new String(b2, "ISO-8859-1");
|
||||||
@ -60,7 +60,7 @@
|
|||||||
constraint = new Constraint(user2, JETTY_ROLE);
|
constraint = new Constraint(user2, JETTY_ROLE);
|
||||||
constraint.setAuthenticate(true);
|
constraint.setAuthenticate(true);
|
||||||
cm = new ConstraintMapping();
|
cm = new ConstraintMapping();
|
||||||
@@ -1025,7 +1029,7 @@
|
@@ -1034,7 +1038,7 @@
|
||||||
// each UTF-8 byte as a char
|
// each UTF-8 byte as a char
|
||||||
// this is what chrome does
|
// this is what chrome does
|
||||||
String user3 = new String(b1, "ISO-8859-1");
|
String user3 = new String(b1, "ISO-8859-1");
|
||||||
|
Reference in New Issue
Block a user