Skip to content

[CC-3981] Fix Paypage requests broken by internal keyClassMap leaking into serialized payload - #236

Merged
Ryouzanpaku merged 3 commits into
mainfrom
CC-3981/fix-paypage-keyclassmap-serialization
Aug 14, 2026
Merged

[CC-3981] Fix Paypage requests broken by internal keyClassMap leaking into serialized payload#236
Ryouzanpaku merged 3 commits into
mainfrom
CC-3981/fix-paypage-keyclassmap-serialization

Conversation

@Ryouzanpaku

@Ryouzanpaku Ryouzanpaku commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Paypage (V2) requests were failing because the internal $keyClassMap static lookup table was being serialized into the outgoing API request body.
  • Root cause: PR Refactor expose properties to avoid catching exceptions on private properties of parent classes #206 refactored AbstractUnzerResource::exposeProperties() to select properties via ReflectionClass::getProperties(ReflectionProperty::IS_PROTECTED), which filters purely on visibility and does not exclude static properties. Paypage::$keyClassMap (protected static) was picked up and exposed alongside real instance properties.
  • Fix: exposeProperties() now skips any isStatic() property, so no static property (on any resource, present or future) can leak into a request again. Additionally tightened Paypage::$keyClassMap to private as defense-in-depth, since it is only used internally within the class.
  • Audited the rest of the SDK — no other class has a protected static property, so Paypage was the only resource affected.
  • Also fixing some failing failing test data.

Jira: CC-3981

Dependencies

None.

…eaking into serialized payload

exposeProperties() filtered properties by visibility only, so a protected
static lookup table was picked up by reflection and sent to the API.
Exclude static properties in the base class and tighten keyClassMap's
visibility to private since it is only used internally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Ryouzanpaku
Ryouzanpaku requested a review from a team as a code owner August 6, 2026 14:31
@Ryouzanpaku
Ryouzanpaku enabled auto-merge (squash) August 14, 2026 10:02
@Ryouzanpaku
Ryouzanpaku merged commit 735dd5b into main Aug 14, 2026
9 of 10 checks passed
@Ryouzanpaku
Ryouzanpaku deleted the CC-3981/fix-paypage-keyclassmap-serialization branch August 14, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants