Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-93655

Getting HTTP 400 while saving page by using the close button.

      Issue Summary

      This is reproducible on Data Center: (yes)

      If the page contains one of the following characters sets in the content the saving process gets a HTTP 400 message.

      ../ 
      ..\ 
      …/ 
      …\
      

      Steps to Reproduce

      1. Create a fresh instance with Confluence 7.19.17
      2. Create test space
      3. Create a test page
      4. Insert ../ to the page and save it
      5. Then edit the page again and add new content then click Close to save as a draft
      6. Gets HTTP 400

      Expected Results

      The saving process should be completed properly.

      Actual Results

      Getting HTTP 400 message after clicking the close button.

      Workaround

      Option 1 - Using Confluence Source Editor

      1. Install the Confluence Source Editor app (from Atlassian Labs) in your Confluence Server/Data Center.
      2. Navigate to the affected page and select Edit at the top of the page.
      3. Select the Open in source editor button ('<>' symbol in the upper-right corner).
      4. Replace the below characters with ./ and .\
        ../ 
        ..\ 
        …/ 
        …\
        
      5. Click Apply then Update
      6. Refresh the page.

      Option 2 - Database Manipulation

      1. Find the page ID via UI —> How to get Confluence page ID
      2. Stop Confluence
      3. Create a backup of Confluence's database. Save somewhere offsite for safekeeping.
      4. Execute the below query if the Collaborative Editing is enabled on Confluence;
        update CONTENTPROPERTIES set stringval='synchrony-recovery' where propertyname = 'sync-rev-source' and contentid=<Page Id>;
        
      5. Run the following SQL query on Confluence's database:
        select * from bodycontent b where b.contentid=<Page Id>;
        
      6. Get the bodycontent from the above query and open it in a text editor.
      7. Replace the below characters with ./ and .\
        ../ 
        ..\ 
        …/ 
        …\
        
      8. Execute the below query to update bodycontent
        update bodycontent set body='<Copy Edited Content Here>' where contentid=<Page Id>;
        
      9. Start Confluence

      Please apply the changes on the test or staging environment first to prevent any data loss.

            [CONFSERVER-93655] Getting HTTP 400 while saving page by using the close button.

            Jing Zheng added a comment -

            Hi 22ae454f7105 , 8.6.2 is not an LTS version so the fix is not backported there. Please refer to our bugfix policy and release notes for more info.

            Jing Zheng added a comment - Hi 22ae454f7105 , 8.6.2 is not an LTS version so the fix is not backported there. Please refer to our bugfix policy and release notes for more info.

            Jing Zheng added a comment -

            Hi 1caf9a948cc0 , I have verified again this has been fixed in 7.19.18. If you are experiencing a similar issue, it could be caused by a different request. You can check the linked issues in this ticket. If your issue is not there, please raise a support ticket so we can address it in a future release. Thank you.

            Jing Zheng added a comment - Hi 1caf9a948cc0 , I have verified again this has been fixed in 7.19.18. If you are experiencing a similar issue, it could be caused by a different request. You can check the linked issues in this ticket. If your issue is not there, please raise a support ticket so we can address it in a future release. Thank you.

            Jing Zheng added a comment -

            Hi 2f50ce82706f , for the style sheet issue, we have a linked issue https://jira.atlassian.com/browse/CONFSERVER-94256. For the copy page issue, please kindly raise a support ticket so we can identify the exact details of the affected request. Thanks.

            Jing Zheng added a comment - Hi 2f50ce82706f , for the style sheet issue, we have a linked issue https://jira.atlassian.com/browse/CONFSERVER-94256 . For the copy page issue, please kindly raise a support ticket so we can identify the exact details of the affected request. Thanks.

            Still happens in v7.19.19 when you try to copy a page in which ../ is used either in headline or body and save it.
            HTTP 400 shows up again once you hit the save button.

            KVB Collab Team added a comment - Still happens in v7.19.19 when you try to copy a page in which ../ is used either in headline or body and save it. HTTP 400 shows up again once you hit the save button.

            We can still reproduce the issue with 7.19.18 so I think it's not fixed yet.

            Patrick Albrecht added a comment - We can still reproduce the issue with 7.19.18 so I think it's not fixed yet.

            Ravi Kumar added a comment -

            Confluence Version 8.6.2 is also impacted with this issue.

            Ravi Kumar added a comment - Confluence Version 8.6.2 is also impacted with this issue.

            Same Issue with style sheets, btw
            If you have a relative path (starts wih ../) in a style sheet, then you are not able to save that anymore (http400).
            Not fixed with    7.19.18 !

            KVB Collab Team added a comment - Same Issue with style sheets, btw If you have a relative path (starts wih ../) in a style sheet, then you are not able to save that anymore (http400). Not fixed with    7.19.18 !

            Michael Richter added a comment - - edited

            In 8.5.5 the close button now work, but the also reported issue with the Source Editor is not closed.

            Error loading source - Unkown error occured calling server (400)

            Michael Richter added a comment - - edited In 8.5.5 the close button now work, but the also reported issue with the Source Editor is not closed. Error loading source - Unkown error occured calling server (400)

            Fixed verified on 7.19.18, but we just noticed that if you create a page with ../ from the start and hit "publish", it throws a 400 error.  Not as critical as the original bug, but it should still be addressed in the next release

             

            Vincent Balagtas added a comment - Fixed verified on 7.19.18, but we just noticed that if you create a page with ../ from the start and hit "publish", it throws a 400 error.  Not as critical as the original bug, but it should still be addressed in the next release  

            Jing Zheng added a comment -

            580fc054682a Hi Babu, I just did another check on 8.5.5 and can confirm that the 400 error has been resolved. The issue you've described appears to be separate from this. I would recommend raising a support ticket for this issue, which will allow our support engineers to help identify the exact cause. Thanks

            Jing Zheng added a comment - 580fc054682a Hi Babu, I just did another check on 8.5.5 and can confirm that the 400 error has been resolved. The issue you've described appears to be separate from this. I would recommend raising a support ticket for this issue, which will allow our support engineers to help identify the exact cause. Thanks

            Babu R added a comment -

            We’ve upgraded our environment to v8.5.5 & clicking close button is now NOT throwing 500 error. However, the other issue related to Source Editor is which is from Appfire is still persists.

            i.e., SourceEditor functionality is still not working on the affected pages. Appfire team disregarded that the SE issue is Confluence-specific and not an Plugin-specific issue.

            Babu R added a comment - We’ve upgraded our environment to v8.5.5 & clicking close button is now NOT throwing 500 error. However, the other issue related to Source Editor  is which is from  Appfire  is still persists. i.e., SourceEditor functionality is still not working on the affected pages.   Appfire team disregarded that the SE issue is Confluence-specific and not an Plugin-specific issue.

            A fix for this issue is available in Confluence Server and Data Center 8.5.5.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Jordan Anslow added a comment - A fix for this issue is available in Confluence Server and Data Center 8.5.5. Upgrade now or check out the Release Notes to see what other issues are resolved.

            A fix for this issue is available in Confluence Server and Data Center 7.19.18.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            James Whitehead added a comment - A fix for this issue is available in Confluence Server and Data Center 7.19.18. Upgrade now or check out the Release Notes to see what other issues are resolved.

            8.6.2 also appears to be affected.

            Scott Derderian added a comment - 8.6.2 also appears to be affected.

            We need a fix ASAP especially since our organization frequently uses Confluence to post source code and scripts that use ../ extensively

            Vincent Balagtas added a comment - We need a fix ASAP especially since our organization frequently uses Confluence to post source code and scripts that use ../ extensively

            Issa added a comment -

            +1, not a real workaround as it modifies the data which would need to be entered by the end-user, in cases like relative URLs or paths

            Issa added a comment - +1, not a real workaround as it modifies the data which would need to be entered by the end-user, in cases like relative URLs or paths

            Babu R added a comment -

            Babu R added a comment - Looks like, Source Editor issue is with https://marketplace.atlassian.com/apps/1215664/source-editor-for-confluence?tab=overview&hosting=datacenter which is from Appfire and the editor mentioned in the bug for work around is https://marketplace.atlassian.com/apps/1210722/confluence-source-editor?tab=overview&hosting=server

            Yash added a comment -

            +1

            Yash added a comment - +1

            Babu R added a comment -

            Is there any plans to pick this Bug for a fix ?

            Babu R added a comment - Is there any plans to pick this Bug for a fix ?

            For me also the Source Editor and the Close-Button seems to not work.

            Michael Richter added a comment - For me also the Source Editor and the Close-Button seems to not work.

            Babu R added a comment - - edited

            Source Editor is not loading for me. Instead directly updating the content in edit page is working. I feel “Source Editor” also affected due to CONFSERVER-93655 

            Babu R added a comment - - edited Source Editor is not loading for me. Instead directly updating the content in edit page is working. I feel “Source Editor” also affected due to CONFSERVER-93655  

            Also experiencing this with 

            ../...

            ../..

            /../

            Shubhendra added a comment - Also experiencing this with  ../... ../.. /../

            Hi everybody,

            I'm experiencing this issue, thankfully in a testing environment, and can confirm that the work-around circumvents the problem.
            It was not necessary to edit the page via the source editor, a simple search and replace within the regular page editor worked fine.

            Unfortunately it's not a work-around we can apply in our productive environment
            because it breaks certain path descriptions needed by our users.

            Hopefully you will be able to fix this in an upcoming version, best of luck!

             

             

            Christoph Monig added a comment - Hi everybody, I'm experiencing this issue, thankfully in a testing environment, and can confirm that the work-around circumvents the problem. It was not necessary to edit the page via the source editor, a simple search and replace within the regular page editor worked fine. Unfortunately it's not a work-around we can apply in our productive environment because it breaks certain path descriptions needed by our users. Hopefully you will be able to fix this in an upcoming version, best of luck!    

              8b5c2ab424ac Jing Zheng
              ae95049760ab Kaan Çalışkan
              Affected customers:
              39 This affects my team
              Watchers:
              67 Start watching this issue

                Created:
                Updated:
                Resolved: