Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory-plugins fusiondirectory-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 65
    • Issues 65
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectory-pluginsfusiondirectory-plugins
  • Issues
  • #5793
Something went wrong while setting issue due date.
Closed
Open
Issue created 7 years ago by Krügl Matthias@kmatthiasReporter
  • New related issue

  • New related issue

Giving an array as base stalls the webservice

Closed

Giving an array as base stalls the webservice

Description

Distribution Name and Version

Debian Stretch

FusionDirectory Version

1.0.19-1-debian, 1.2

Plugin with the defect

webservice

PHP version used

7.0-49

Origin of php packages

Debian stretch

Steps to Reproduce

We are not sure which steps are needed.

  1. Create a department, /test.
  2. Create a template within this department.
  3. Create an user for the api, e.g. api.
  4. Give the api user manager rights on the department.
  5. From within a JSON-RPC client log in and
  6. Issue a usetemplate with e.g. the following params:
'params': [session_id,
'user',
templatedn,
{'user': {
  'base': {'ou=test,dc=example,dc=org':'/test'},
  'uid': 'uid',
  'sn': 'name',
  'givenName': 'givenname',
 },
}

Expected behavior:

Creation of new user object based on template and submitted values OR error message.

Actual behavior:

Failed request to ldap, Apache process stalls for ~30sec, empty 200 response

(login) apache2: FusionDirectory [api-user]: (debug) Method getId of type JSON-RPC : Params:Array#012(#012)
(template) apache2: FusionDirectory [api-user]: (debug) Method usetemplate of type JSON-RPC : Params:Array#012(#012    [0] => user#012    [1] =>  cn=template_id,ou=templates,ou=people,ou=test,dc=example,dc=org#012    [2] => Array#012        (#012            [user] => Array#012                (#012                    [base] => Array#012                        (#012                            [ou=test,dc=example,dc=org] => /test#012                        )#012#012                    [sn] => name#012                    [uid] => 03test#012                    [givenName] => givennname#012                )#012#012        )#012#012)
slapd[633]: conn=1014 op=2 do_search: invalid dn: "new"

Reproduces how often:

100% (5/5)

Additional Information

Both exists in 1.0.19 and after upgrading to 1.2 from the repo.

We are not sure if we use the api correctly regarding the base, the issue does not reproduce when omitting the attribute base. However when omitting the base we receive the error You have no permission to modify the field "sn" of object "new", as fusiondirectory seems to create and modify a temporary(?) account at dn=new.

Edited 7 years ago

    Tasks

    0
    Cannot read properties of undefined (reading 'workItem')

    Linked items
    0

    Link issues together to show that they're related. Learn more.

    Activity


    • Krügl Matthias changed the description 7 years ago

      changed the description

    • bmortier assigned to @MCMic 7 years ago

      assigned to @MCMic

    • bmortier added PJ1802-0188 label 7 years ago

      added PJ1802-0188 label

    • bmortier changed milestone to %FusionDirectory 1.3 7 years ago

      changed milestone to %FusionDirectory 1.3

    • bmortier added plugin-webservice label 7 years ago

      added plugin-webservice label

    • Côme Chilliet changed title from webservice: Lockup with usetemplate JSON API to Giving an array as base stalls the webservice 7 years ago

      changed title from webservice: Lockup with usetemplate JSON API to Giving an array as base stalls the webservice

    • Côme Chilliet
      Côme Chilliet @cchilliet · 7 years ago
      Reporter

      You should not give an array as the base, just a string. I will add a check for this in core.

      Try:

      {'user': {
        'base': 'ou=test,dc=example,dc=org',
        'uid': 'uid',
        'sn': 'name',
        'givenName': 'givenname',
       },
      }
    • Côme Chilliet mentioned in issue fd#5807 (closed) 7 years ago

      mentioned in issue fd#5807 (closed)

    • Côme Chilliet
      Côme Chilliet @cchilliet · 7 years ago
      Reporter

      Giving an array as the base now returns a proper error thanks to fd#5807 (closed)

      Can you test passing a string and confirm that it works as it should?

    • Côme Chilliet added Need Info To Be Tested labels 7 years ago

      added Need Info To Be Tested labels

    • Côme Chilliet added 15m of time spent at 2018-03-29 7 years ago

      added 15m of time spent at 2018-03-29

    • Côme Chilliet removed Need Info label 6 years ago

      removed Need Info label

    • Côme Chilliet removed To Be Tested label 6 years ago

      removed To Be Tested label

    • Côme Chilliet closed 6 years ago

      closed

    • Côme Chilliet added won't fix label 6 years ago

      added won't fix label

    • Côme Chilliet
      Côme Chilliet @cchilliet · 6 years ago
      Reporter

      No news, closing this.

      See fd#5807 (closed) which is the real bug and fix, this one was just misuse of the webservice.

    Please register or sign in to reply
    Assignee
    Côme Chilliet's avatar
    Côme Chilliet
    Assign to
    Labels
    0
    None
    0
    None
      Assign labels
    • Manage project labels

    Milestone
    No milestone
    None
    Due date
    None
    None
    None
    Time tracking
    No estimate or time spent
    Confidentiality
    Not confidential
    Not confidential

    You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

    Lock issue
    Unlocked
    0
    0 Participants
    Reference:

    Menu

    Explore Projects Groups Topics Snippets