Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-6316

Error log messages from parsing exceptions should be trimmed to reasonable size

    XMLWordPrintable

Details

    • Bug
    • Status: Verified (View Workflow)
    • Major
    • Resolution: Done
    • 7.1.0.DR6
    • 7.1.0.DR12
    • REST
    • None
    • Hide
      1. Start EAP
      2. Deploy application from attachment
      3. Execute following code
      head -c $((10*1024*1024)) < /dev/zero | tr '\0' 'A' > request
      curl http://localhost:8080/wildfly-helloworld-rs/rest/json -d @request -H "Content-Type: application/json"
      
      Show
      Start EAP Deploy application from attachment Execute following code head -c $((10*1024*1024)) < /dev/zero | tr '\0' 'A' > request curl http: //localhost:8080/wildfly-helloworld-rs/ rest /json -d @request -H "Content-Type: application/json"

    Description

      If the REST endpoint consumes POST requests with JSON or XML data and data are invalid, the first unrecognized token is printed to server.log. If the first token is word of length 10MB, the whole word is printed. This is potentially dangerous and can be used to attack the server by filling the disk with logs.

      Example of log message

      2016-10-06 11:52:13,450 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (default task-6) RESTEASY002005: Failed executing POST /json: org.jboss.resteasy.spi.ReaderException: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-asoldano Alessio Soldano
              eduda_jira Erich Duda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: