Skip to content

Conversation

@jf-cbd
Copy link
Member

@jf-cbd jf-cbd commented Jun 18, 2025

Internal

Base information

Question Answer
Related to a SourceForge thead / Another PR / Combodo ticket? N°8316
Type of change? Enhancement

Symptom (bug) / Objective (enhancement)

Callback functions can actually be called even if their signature is incorrect, which can lead to unexpected behaviors.

Reproduction procedure (bug)

  1. On iTop 3.2.1
  2. With the included module of combodo-webhook-integration
  3. With PHP 8.3
  4. Set up a webhook with a callback having a signature that is not the expected one
  5. Then trigger the webhook
  6. Finally, see that the callback have been called

Cause (bug)

There is actually no check on the callback signature

Proposed solution (bug and enhancement)

  • Perform a check on the callback signature
  • Reactor code to process the 2 different callbacks (the one for payload and on the after receiving the response) at the same place

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested all changes I made on an iTop instance
  • Would a unit test be relevant and have I added it?
  • Is the PR clear and detailed enough so anyone can understand without digging in the code?

@jf-cbd jf-cbd requested a review from rquetiez June 18, 2025 11:28
@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Jun 18, 2025
Copy link
Collaborator

@Hipska Hipska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion to be even more sure about class names..

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>
@jf-cbd
Copy link
Member Author

jf-cbd commented Jun 18, 2025

One suggestion to be even more sure about class names..

Done, thanks for the suggestion :)

@rquetiez rquetiez merged commit da4df5a into master Jun 20, 2025
1 check passed
@accognet accognet deleted the feature/8316-improve-callback-verification branch September 22, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants