Skip to content

[API-v3] Add tests for path traversal and invalid ID encoding methods - #277

Open
Orkuncakilkaya wants to merge 3 commits into
api-v3from
inter-2506-encode-path-params-api-v3
Open

[API-v3] Add tests for path traversal and invalid ID encoding methods#277
Orkuncakilkaya wants to merge 3 commits into
api-v3from
inter-2506-encode-path-params-api-v3

Conversation

@Orkuncakilkaya

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🟢 Coverage increased by 34.33%

Code Coverage Report

Coverage Report

St. Category Percentage Covered / Total
🔴 Statements 34.33% 1892 / 5512
🔴 Functions 26.74% 675 / 2524
Files Coverage
St. File Methods Statements Total Coverage
🔴 src/Model/BotdBotResult.php 0.00% 0.00% 0.00%
🔴 src/Model/ErrorCode.php 0.00% 0.00% 0.00%
🔴 src/Model/ModelInterface.php 0.00% 0.00% 0.00%
🔴 src/Model/ProxyConfidence.php 0.00% 0.00% 0.00%
🔴 src/Model/VPNConfidence.php 0.00% 0.00% 0.00%

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The malformed-ID test matrix omits empty request IDs for updateEvent, and one test name misstates the tested behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds regression tests for safely encoding malformed IDs in API path segments.

Changes:

  • Tests serializer handling of traversal, URLs, slashes, and empty strings.
  • Verifies request paths and hosts across fingerprint API methods.
File summaries
File Description
test/ObjectSerializerTest.php Covers path-value encoding edge cases.
test/FingerprintApiTest.php Covers malformed IDs in generated API requests.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/FingerprintApiTest.php
Comment thread test/ObjectSerializerTest.php Outdated
@Orkuncakilkaya
Orkuncakilkaya marked this pull request as ready for review September 10, 2026 12:44
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Following releases will be created using changesets from this PR:

fingerprint-pro-server-api-php-sdk@6.13.1

Patch Changes

  • Fixed request_id/visitor_id values of exactly . or .. being collapsed by curl's URL normalization before the request is sent, causing getEvent, updateEvent, deleteVisitorData, and getVisits to hit the wrong endpoint instead of the requested resource. (8df3e94)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants