Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10627

Configurable JSON prefix on MappingJackson2HttpMessageConverter and MappingJacksonHttpMessageConverter

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.2.4, 4.0 M2
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      Spring MVC currently prevents JSON hijacking by prefixing the response with "{} &&" if the prefixJSON bean property is set.

      This has been made configurable in MappingJackson(2)JsonView (see SPR-10567), but not in MappingJackson(2)HttpMessageConverter.

      Could we implement the same change in the message converters?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                Reporter:
                halvards Halvard Skogsrud
                Last updater:
                Spring Issuemaster
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  40 weeks, 1 day ago