Confluence
  1. Confluence
  2. CONF-20426

Possible bug when inserting JIRA Gadget into Confluence 3.3 Rich Text Editor

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Answered
    • Affects Version/s: 3.3
    • Fix Version/s: None
    • Component/s: Gadgets, WYSIWYG editing
    • Labels:
    • Last commented by user?:
      true
    • Internal Complexity:
      7
    • Internal Value:
      7

      Description

      Reported by Nick Venegas (I was able to reproduce the same symptoms locally):

      Hi

      I've come across a problem in adding a gadget served from a JIRA
      4.2-SNAPSHOT (via trusted apps) to Confluence 3.3.

      Confluence 3.1.2 and 3.2.1_01 do not exhibit the problem:

      Steps
      1. Run JIRA 4.2-SNAPSHOT standalone
      (https://jira.bamboo.atlassian.com/browse/QA-ENT-717/artifact/Standalone/atlassian-jira-enterprise-4.2-SNAPSHOT)
      2. Run Confluence 3.3 standalone
      (http://filehost/releases/confluence/downloads/confluence-3.3-std.tar.gz)
      choosing the evaluation install during setup.
      3. Setup trusted apps between the two instances.
      4. Add the JIRA Pie Chart gadget as an external gadget in Confluence
      (e.g., http://cardinal.sydney.atlassian.com:8880/rest/gadgets/1.0/g/com.atlassian.jira.gadgets:pie-chart-gadget/gadgets/piechart-gadget.xml)
      5. In confluence, add a new page and in RTE mode, insert the JIRA pie
      chart gadget.

      Expected

      • The JIRA pie chart gadget macro text should be inserted into the RTE textarea.

      Actual

      If you use the wiki markup editor instead of the RTE, then inserting
      the gadget works as normal.

      I came across this when verifying the bugfix for
      http://jdog.atlassian.com/browse/JRADEV-1903 (which is covered by
      http://jira.atlassian.com/browse/CONF-20106).

      Any ideas on what is going wrong here? I'm not sure if it's a bug on
      the JIRA side or not.

      If you want a quick reproduction of the bug, feel free ping me and I
      can setup up the instances for you to try it against.

      Cheers
      Nic

        Issue Links

          Activity

          Hide
          David O'Flynn [Atlassian] added a comment -

          That is, that the Inception installers put JIRA and Confluence on different context paths.

          Show
          David O'Flynn [Atlassian] added a comment - That is, that the Inception installers put JIRA and Confluence on different context paths.
          Hide
          Roy Krishna [Atlassian] added a comment -

          @DoF

          I've asked Wendell to do exactly that.

          Show
          Roy Krishna [Atlassian] added a comment - @DoF I've asked Wendell to do exactly that.
          Hide
          Matt Ryall [Atlassian] added a comment -

          Great - I've raised CONF-22530 to track this for Confluence.

          Show
          Matt Ryall [Atlassian] added a comment - Great - I've raised CONF-22530 to track this for Confluence.
          Hide
          Chris Mountford [Atlassian] added a comment -

          I think the correct solution is to separate the session cookie key namespaces. The JIRA and Confluence session keys should be unique since cookies are not scoped to a port and it's reasonable to expect the two apps to be configured on the same host at the root path with different ports.

          So the JIRA session cookie would be JIRA_SESSION and Confluence would be CONF_SESSION, say.

          Show
          Chris Mountford [Atlassian] added a comment - I think the correct solution is to separate the session cookie key namespaces. The JIRA and Confluence session keys should be unique since cookies are not scoped to a port and it's reasonable to expect the two apps to be configured on the same host at the root path with different ports. So the JIRA session cookie would be JIRA_SESSION and Confluence would be CONF_SESSION, say.
          Hide
          Stefan Saasen [Atlassian] added a comment -

          Unfortunately that would not be as easy as it sounds.

          The servlet spec actually defines that the session cookie must be named JSESSIONID:

          SRV.7.1.1 Cookies
          Session tracking through HTTP cookies is the most used session tracking mechanism and is required to be supported by all servlet containers.
          The container sends a cookie to the client. The client will then return the cookie on each subsequent request to the server, unambiguously associating the request with a session. The name of the session tracking cookie must be JSESSIONID.

          Tomcat can be configured to use a different name for the session cookie org.apache.catalina.SESSION_COOKIE_NAME (http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html) and as far as I can remember (I try hard to forget) Websphere allows you to change it in the deployment config as well.

          I wouldn't be surprised if code assumes it's always JSESSIONID as that's part of the spec.

          Show
          Stefan Saasen [Atlassian] added a comment - Unfortunately that would not be as easy as it sounds. The servlet spec actually defines that the session cookie must be named JSESSIONID : SRV.7.1.1 Cookies Session tracking through HTTP cookies is the most used session tracking mechanism and is required to be supported by all servlet containers. The container sends a cookie to the client. The client will then return the cookie on each subsequent request to the server, unambiguously associating the request with a session. The name of the session tracking cookie must be JSESSIONID. Tomcat can be configured to use a different name for the session cookie org.apache.catalina.SESSION_COOKIE_NAME ( http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html ) and as far as I can remember (I try hard to forget) Websphere allows you to change it in the deployment config as well. I wouldn't be surprised if code assumes it's always JSESSIONID as that's part of the spec.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Last commented:
                2 years, 48 weeks ago