Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6589

ClientInfo fails with NumberFormatException for unusual browser versions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.1.0
    • Fix Version/s: 7.11.0, 8.2.0
    • Component/s: wicket
    • Labels:
      None

      Description

      Determining browser versions from the user agent can fail with an exception. As seen on our PROD environment for the following user agent:

      "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.01537112190982"

      I'm not sure this is a valid UA, but Wicket should probably never fail with an exception in this case.

      Details: java.lang.NumberFormatException: For input string: "01537112190982"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
              at java.lang.Integer.parseInt(Integer.java:583)
              at java.lang.Integer.parseInt(Integer.java:615)
              at org.apache.wicket.protocol.http.request.WebClientInfo.setMajorMinorVersionByPattern(WebClientInfo.java:354)
              at org.apache.wicket.protocol.http.request.WebClientInfo.setMozillaProperties(WebClientInfo.java:285)
              at org.apache.wicket.protocol.http.request.WebClientInfo.init(WebClientInfo.java:198)
              at org.apache.wicket.protocol.http.request.WebClientInfo.<init>(WebClientInfo.java:112)
              at org.apache.wicket.protocol.http.request.WebClientInfo.<init>(WebClientInfo.java:76)
              at org.apache.wicket.protocol.http.request.WebClientInfo.<init>(WebClientInfo.java:65)
              at org.apache.wicket.protocol.http.WebSession.getClientInfo(WebSession.java:88)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                svenmeier Sven Meier
                Reporter:
                thomas.heigl Thomas Heigl
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: