Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-7791

Non-UTF8 characters in Pull Request description or title causes the branch list page to fail

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Low
    • Resolution: Fixed
    • None
    • 4.9.0
    • None
    • None

    Description

      If a Pull Request is created and there are non UTF-8 characters in the title or the description, the server may fail to render them as JSON objects. This is caused by Jackson finding incomplete/invalid UTF-16 surrogate byte sequences in the stream.

      org.codehaus.jackson.JsonGenerationException: Incomplete surrogate pair: first char 0xdcaf, second 0x22
              at org.codehaus.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480) ~[jackson-core-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.impl.Utf8Generator._decodeSurrogate(Utf8Generator.java:1702) ~[jackson-core-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.impl.Utf8Generator._outputSurrogates(Utf8Generator.java:1657) ~[jackson-core-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.impl.Utf8Generator._outputRawMultiByteChar(Utf8Generator.java:1643) ~[jackson-core-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.impl.Utf8Generator._writeSegmentedRaw(Utf8Generator.java:809) ~[jackson-core-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.impl.Utf8Generator.writeRaw(Utf8Generator.java:723) ~[jackson-core-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.impl.Utf8Generator.writeRaw(Utf8Generator.java:691) ~[jackson-core-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.impl.JsonGeneratorBase.writeRawValue(JsonGeneratorBase.java:254) ~[jackson-core-asl-1.9.13.jar:1.9.13]
              at com.atlassian.bitbucket.rest.util.RestJsonable$RestJsonSerializer.serialize(RestJsonable.java:45) ~[na:na]
              at com.atlassian.bitbucket.rest.util.RestJsonable$RestJsonSerializer.serialize(RestJsonable.java:39) ~[na:na]
              at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:262) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:262) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.StdContainerSerializers$IndexedListSerializer.serializeContents(StdContainerSerializers.java:122) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.StdContainerSerializers$IndexedListSerializer.serializeContents(StdContainerSerializers.java:71) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.AsArraySerializerBase.serialize(AsArraySerializerBase.java:86) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:262) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:610) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1604) ~[jackson-mapper-asl-1.9.13.jar:1.9.13]
              at org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:558) ~[na:na]
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) ~[na:na]
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) ~[na:na]
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) ~[na:na]
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) ~[na:na]
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) ~[na:na]
              at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:88) ~[StashAuthenticationFilter.class:na]
      ...
      

      Attachments

        Issue Links

          Activity

            People

              mszczepanski Marcin
              jpalacios Juan Palacios
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: