This is an automated email from the ASF dual-hosted git repository.
alexoree pushed a commit to branch feature/JUDDI-558
in repository https://gitbox.apache.org/repos/asf/juddi.git
The following commit(s) were added to refs/heads/feature/JUDDI-558 by this push:
new c64ec44 JUDDI-997 made some minor changes, should resolve this
c64ec44 is described below
commit c64ec446760f5efec489c3a967388145c98b2973
Author: Alex O'Ree <[email protected]>
AuthorDate: Thu Jun 20 21:57:08 2019 -0400
JUDDI-997 made some minor changes, should resolve this
---
.../java/org/apache/juddi/adminconsole/hub/UddiAdminHub.java | 11 ++++++-----
.../org/apache/juddi/adminconsole/resources/web.properties | 2 ++
juddiv3-war/src/main/webapp/admin/ajax/loginpost.jsp | 10 ++++++----
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git
a/juddiv3-war/src/main/java/org/apache/juddi/adminconsole/hub/UddiAdminHub.java
b/juddiv3-war/src/main/java/org/apache/juddi/adminconsole/hub/UddiAdminHub.java
index 9ae8c44..aefb8da 100644
---
a/juddiv3-war/src/main/java/org/apache/juddi/adminconsole/hub/UddiAdminHub.java
+++
b/juddiv3-war/src/main/java/org/apache/juddi/adminconsole/hub/UddiAdminHub.java
@@ -1562,6 +1562,11 @@ public class UddiAdminHub {
return
clientConfig.getConfiguration().getBoolean(PROP_ADMIN_LOCALHOST_ONLY, true);
}
+ /**
+ * returns null on successful login, otherwise an error message
+ *
+ * @return
+ */
public String verifyLogin() {
ensureConfig();
if (style != AuthStyle.UDDI_AUTH) {
@@ -1588,11 +1593,7 @@ public class UddiAdminHub {
} catch (Exception ex) {
return handleException(ex);
}
- /*
- bp = (BindingProvider) juddi;
- context = bp.getRequestContext();
- context.put(BindingProvider.USERNAME_PROPERTY,
session.getAttribute("username"));
- context.put(BindingProvider.USERNAME_PROPERTY,
session.getAttribute(AES.Decrypt("password", (String)
properties.get("key"))));*/
+
return null;
} else {
if (token != null) {
diff --git
a/juddiv3-war/src/main/resources/org/apache/juddi/adminconsole/resources/web.properties
b/juddiv3-war/src/main/resources/org/apache/juddi/adminconsole/resources/web.properties
index 0522c2f..c80bac0 100644
---
a/juddiv3-war/src/main/resources/org/apache/juddi/adminconsole/resources/web.properties
+++
b/juddiv3-war/src/main/resources/org/apache/juddi/adminconsole/resources/web.properties
@@ -386,3 +386,5 @@ items.entity=Entity ID
items.urg=Username, role, or group
items.level=Access Level
+items.enterpassword=Please enter a password
+items.enteruser=Please enter a username
\ No newline at end of file
diff --git a/juddiv3-war/src/main/webapp/admin/ajax/loginpost.jsp
b/juddiv3-war/src/main/webapp/admin/ajax/loginpost.jsp
index aa03246..be60108 100644
--- a/juddiv3-war/src/main/webapp/admin/ajax/loginpost.jsp
+++ b/juddiv3-war/src/main/webapp/admin/ajax/loginpost.jsp
@@ -20,6 +20,7 @@
*/
--%>
+<%@page import="org.apache.juddi.adminconsole.resources.ResourceLoader"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.io.File"%>
<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
@@ -40,7 +41,7 @@
p.load(fis);
fis.close();
} catch (Exception ex) {
- ex.printStackTrace();
+ this.getServletContext().log("umable to load config", ex);
out.write("Internal configuration error");
response.setStatus(406);
ok = false;
@@ -55,13 +56,14 @@
session.setAttribute("username", request.getParameter("username"));
if (request.getParameter("password") == null ||
request.getParameter("password").length() == 0) {
response.setStatus(406);
- out.write("Please enter a password");
+ out.write(ResourceLoader.GetResource(session,
"items.enterpassword"));
ok = false;
//TODO i18n
}
if (request.getParameter("username") == null ||
request.getParameter("username").length() == 0) {
response.setStatus(406);
- out.write("Please enter a username");
+ out.write(ResourceLoader.GetResource(session,
"items.enteruser"));
+ //out.write("Please enter a username");
ok = false;
//TODO i18n
}
@@ -79,7 +81,7 @@
String msg = x.verifyLogin();
if (msg != null) {
response.setStatus(406);
- out.write(msg);
+ out.write(StringEscapeUtils.escapeHtml(msg));
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]