pki-bot / pki-issues-final

0 stars 0 forks source link

NumberFormatException in LDAPProfileSubsystem #2128

Closed pki-bot closed 4 years ago

pki-bot commented 4 years ago

This issue was migrated from Pagure Issue #2579. Originally filed by edewata (@edewata) on 2017-01-16 23:32:48:


Under certain circumstances the LDAPProfileSubsystem may generate NumberFormatException because it's trying to parse an entryUSN value greater than the maximum range of an Integer.

Jan  9 19:16:51 example server: Exception in thread "profileChangeMonitor" java.lang.NumberFormatException: For input string: "2953078550"
Jan  9 19:16:51 example server: at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
Jan  9 19:16:51 example server: at java.lang.Integer.parseInt(Integer.java:583)
Jan  9 19:16:51 example server: at java.lang.Integer.<init>(Integer.java:867)
Jan  9 19:16:51 example server: at com.netscape.cmscore.profile.LDAPProfileSubsystem.readProfile(LDAPProfileSubsystem.java:153)
Jan  9 19:16:51 example server: at com.netscape.cmscore.profile.LDAPProfileSubsystem.run(LDAPProfileSubsystem.java:488)
Jan  9 19:16:51 example server: at java.lang.Thread.run(Thread.java:745)

A possible solution is to use BigInteger instead of Integer.

pki-bot commented 4 years ago

Comment from ftweedal (@frasertweedale) at 2017-01-23 08:50:44

I'm on this.

pki-bot commented 4 years ago

Comment from ftweedal (@frasertweedale) at 2017-01-23 09:47:24

attachment pki-frasertweedale-0149-Use-BigInteger-for-entryUSN.patch

pki-bot commented 4 years ago

Comment from edewata (@edewata) at 2017-01-23 21:06:05

Fixed in master:

pki-bot commented 4 years ago

Comment from mharmsen (@mharmsen) at 2017-01-26 19:55:31

Moving to 10.3 critical based upon associated bug

pki-bot commented 4 years ago

Comment from msauton (@msauton) at 2017-01-27 23:30:35

fix corrected the behavior when having high entryusn values in the o=ipaca ipa's dogtag backend, no more exception, and proper CA start, thanks.

pki-bot commented 4 years ago

Comment from mharmsen (@mharmsen) at 2017-01-28 02:56:36

Replying to [comment:4 edewata]:

Fixed in master:

  • 79c6d70a8434cf52f9bac8bfa0367876baccb054

Cherry-picked to DOGTAG_10_3_BRANCH:

pki-bot commented 4 years ago

Comment from edewata (@edewata) at 2017-02-27 14:01:36

Metadata Update from @edewata: