Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31933

Able to create directory entry with BLANK id property using add directly API

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10, 2021
    • Fix Version/s: 2023.3, 2021.44
    • Component/s: Directory
    • Release Notes Summary:
      It is no longer possible to create a directory entry with a blank id
    • Backlog priority:
      700
    • Sprint:
      nxplatform #96
    • Story Points:
      2

      Description

      NXP-31734 corrected this for NULL IDs, client requests correction for zero-byte IDs.

      It should not be possible to create a directory entry that has an ID that is a zero-byte string.

      Client also requests correction for IDs that are a string containing only any number of spaces.

      It should not be possible to create a directory entry that has an ID that contains only spaces.

      Unlike NXP-31734 this needs to be corrected for MongoDB and the other DB options like Postgres and H2.

      To reproduce (zero-byte string)
      curl -u Administrator:Administrator --location 'http://localhost:8080/nuxeo/api/v1/directory/language?pageSize=0' --header 'Content-Type: application/json' --data '{    "entity-type": "directoryEntry",    "directoryName": "language",    "properties": { "id":"",        "obsolete": 0,        "label": "Test1"    }}' 
      
      To reproduce (string with spaces)
      curl -u Administrator:Administrator --location 'http://localhost:8080/nuxeo/api/v1/directory/language?pageSize=0' --header 'Content-Type: application/json' --data '{    "entity-type": "directoryEntry",    "directoryName": "language",    "properties": { "id":"  ",        "obsolete": 0,        "label": "Test1"    }}' 
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: