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-integrator fusiondirectory-integrator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectory-integratorfusiondirectory-integrator
  • Merge requests
  • !44
An error occurred while fetching the assigned milestone of the selected merge_request.

Resolve "[Integrator] - When webservice call is triggered with a DN containing a space, result is NULL"

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged dockx thibault requested to merge 31-integrator-when-webservice-call-is-triggered-with-a-dn-containing-a-space-result-is-null into dev 8 months ago
  • Overview 0
  • Commits 2
  • Pipelines 3
  • Changes 1

Related to #31 (closed)

Viewing commit 7936e635
Next
Show latest version
1 file
+ 5
− 3

    Preferences

    File browser
    Compare changes
  • Verified
    7936e635
    dockx thibault
    :sparkles: Feat(Integrator) - WebService call encode DN url · 7936e635
    dockx thibault authored 8 months ago
    Encodes rawurlencode passed DN correctly.
src/FusionDirectory/Rest/WebServiceCall.php
+ 5
− 3
  • View file @ 7936e635

  • Edit in single-file editor

  • Open in Web IDE


@@ -4,7 +4,7 @@ namespace FusionDirectory\Rest;
@@ -4,7 +4,7 @@ namespace FusionDirectory\Rest;
class WebServiceCall
class WebServiceCall
{
{
private $URL, $method, $token; //String
private $URL, $method, $token; //String
private $data, $authData; //Array
private $data, $authData; //Array
/**
/**
* @var false|resource
* @var false|resource
*/
*/
@@ -141,7 +141,8 @@ class WebServiceCall
@@ -141,7 +141,8 @@ class WebServiceCall
]
]
];
];
$this->setCurlSettings($_ENV['FUSION_DIRECTORY_API_URL'] . '/objects/tasks/' . $dn, $data, 'PATCH');
// the DN can contain space which must be URL encoded correctly.
 
$this->setCurlSettings($_ENV['FUSION_DIRECTORY_API_URL'] . '/objects/tasks/' . rawurlencode($dn), $data, 'PATCH');
curl_exec($this->ch);
curl_exec($this->ch);
$this->handleCurlError($this->ch);
$this->handleCurlError($this->ch);
@@ -168,7 +169,8 @@ class WebServiceCall
@@ -168,7 +169,8 @@ class WebServiceCall
'refreshUser' => NULL
'refreshUser' => NULL
];
];
$this->setCurlSettings($_ENV['FUSION_DIRECTORY_API_URL'] . '/objects/user/' . $dn, $data, 'PATCH');
// A DN can contain space and therefore must be encoded properly before processing.
 
$this->setCurlSettings($_ENV['FUSION_DIRECTORY_API_URL'] . '/objects/user/' . rawurlencode($dn), $data, 'PATCH');
curl_exec($this->ch);
curl_exec($this->ch);
$this->handleCurlError($this->ch);
$this->handleCurlError($this->ch);
Assignee
dockx thibault's avatar
dockx thibault
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 Participants
Reference:
Source branch: 31-integrator-when-webservice-call-is-triggered-with-a-dn-containing-a-space-result-is-null

Menu

Explore Projects Groups Topics Snippets