Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-6417

MAXFAILEDLOGINATTEMPTS in ExtendedInformation can be saved as a string if set via WS

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: EJBCA 6.9.1
    • Fix Version/s: EJBCA 6.11.0
    • Component/s: None
    • Labels:
    • Sprint:
      EJBCA Sprint 5

      Description

      MAXFAILEDLOGINATTEMPTS in ExtendedInformation can be saved as a string if set via WS. This is due to the fact that the information carrier over WS (ExtendedInformationWS) only saves Strings, so it gets saved as such as well.

      This leads to the following error:

      java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
        at org.cesecore.certificates.endentity.ExtendedInformation.getMaxLoginAttempts(ExtendedInformation.java:223)
      

      The trivial fix is to simply guard against a ClassCastException and instead produce the int from a String instead.

        Attachments

          Activity

            People

            Assignee:
            bastianf Bastian Fredriksson
            Reporter:
            mikek Mike Agrenius Kushner
            Verified by:
            Samuel Lidén Borell
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 15 minutes
                2h 15m