Author: rmeggins
Update of /cvs/dirsec/console/src/com/netscape/management/client/security/csr
In directory
cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25025/console/src/com/netscape/management/client/security/csr
Modified Files:
CertRequestInfoPage.java
Log Message:
Resolves: bug 480251
Bug Description: rhds80 console - ssl - csr wizard really wants a country/region string
Reviewed by: nkinder (Thanks!)
Fix Description: Have to make sure the string is long enough before taking the substring
Platforms tested: RHEL5
Flag Day: no
Doc impact: no
Index: CertRequestInfoPage.java
===================================================================
RCS file:
/cvs/dirsec/console/src/com/netscape/management/client/security/csr/CertRequestInfoPage.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- CertRequestInfoPage.java 18 Jul 2005 00:34:18 -0000 1.1.1.1
+++ CertRequestInfoPage.java 16 Jan 2009 19:38:25 -0000 1.2
@@ -186,8 +186,20 @@
_sessionData.put("organization", o.getText());
_sessionData.put("org_unit", ou.getText());
_sessionData.put("locality", l.getText());
- _sessionData.put("country" , (c.getSelectedItem() !=
null)?((String)(c.getSelectedItem())).substring(0, 2):"");
- _sessionData.put("state" ,
(st.getSelectedItem()!=null)?((String)(st.getSelectedItem())).substring(0,2):"");
+ String c_str = (String)c.getSelectedItem();
+ if ((c_str != null) && (c_str.length() >= 2)) {
+ c_str = c_str.substring(0, 2);
+ } else {
+ c_str = "";
+ }
+ _sessionData.put("country" , c_str);
+ String st_str = (String)st.getSelectedItem();
+ if ((st_str != null) && (st_str.length() >= 2)) {
+ st_str = st_str.substring(0, 2);
+ } else {
+ st_str = "";
+ }
+ _sessionData.put("state" , st_str);
setDN();
Show replies by date