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

Space keys are case-insensitive in the UI, but case-sensitive in the REST API

      The Confluence UI considers space keys to be case-insensitive, e.g. 2 spaces with "test" and "TEST" as keys will not be allowed.

      The Confluence API, on the other hand, will not return a value for a GET with querystring parameter "test" if the key it was created with was "TEST".

            [CONFSERVER-40303] Space keys are case-insensitive in the UI, but case-sensitive in the REST API

            This issue is observed in at least Confluence Server 6.7.2 and also in Confluence Cloud. It is interesting to note that the creation of a page treats the space key as a case-insensitive value, where it is also observed that a page update requires a case-sensitive space key (see also tonybaloney/sphinxcontrib-confluencebuilder#118). Inspecting sources, it appears that a series of space-sanity checks compares the space key value with equals (e.x. ContentCreator::validateUpdate) rather than using a more relaxed check using equalsIgnoreCase (e.x. AbstractCreatePageAction::getFromPage).

            (see also: src/java/com/atlassian/confluence/content/apisupport/ContentCreator.java and src/java/com/atlassian/confluence/api/impl/service/content/typebinding/PageContentTypeApiSupport.java).

            James Knight added a comment - This issue is observed in at least Confluence Server 6.7.2 and also in Confluence Cloud. It is interesting to note that the creation of a page treats the space key as a case-insensitive value, where it is also observed that a page update requires a case-sensitive space key (see also tonybaloney/sphinxcontrib-confluencebuilder#118 ). Inspecting sources, it appears that a series of space-sanity checks compares the space key value with equals (e.x. ContentCreator::validateUpdate ) rather than using a more relaxed check using equalsIgnoreCase (e.x. AbstractCreatePageAction::getFromPage ). (see also:  src/java/com/atlassian/confluence/content/apisupport/ContentCreator.java and src/java/com/atlassian/confluence/api/impl/service/content/typebinding/PageContentTypeApiSupport.java ).

            I can confirm this

            Normann P. Nielsen (Netic) added a comment - I can confirm this

            Minh,

            This was on a local install, so it was: http://localhost:8090/rest/api/space

            Josh Kodroff added a comment - Minh, This was on a local install, so it was: http://localhost:8090/rest/api/space

            Minh Tran added a comment -

            Dear jkodroff224770933,

            Thanks for submitting the ticket
            Would you please let me know the correct url that you used for the rest api?

            Thanks,
            Minh Tran
            Confluence BugMaster
            Atlassian

            Minh Tran added a comment - Dear jkodroff224770933 , Thanks for submitting the ticket Would you please let me know the correct url that you used for the rest api? Thanks, Minh Tran Confluence BugMaster Atlassian

              Unassigned Unassigned
              124919fc2fcd Josh Kodroff
              Affected customers:
              10 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated: