Skip to content

MOBILE-258: Fix regex for operationDomain path#744

Merged
enotniy merged 1 commit into
developfrom
feature/MOBILE-258-fix-regex
Jul 24, 2026
Merged

MOBILE-258: Fix regex for operationDomain path#744
enotniy merged 1 commit into
developfrom
feature/MOBILE-258-fix-regex

Conversation

@enotniy

@enotniy enotniy commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the operations-domain validation to correctly handle percent-encoding in the optional path prefix, preventing malformed % escapes from passing validation and later breaking URL construction at request time.

Changes:

  • Tighten PATH_PREFIX_REGEX to allow only unreserved characters or complete %HH percent-encoded octets in path segments.
  • Add regression tests covering valid percent-encoding and rejecting incomplete/non-hex escapes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sdk/src/main/java/cloud/mindbox/mobile_sdk/SdkValidation.kt Updates the path-prefix regex and KDoc to reject bare/incomplete % while allowing valid %HH escapes.
sdk/src/test/java/cloud/mindbox/mobile_sdk/SdkValidationDomainTest.kt Adds test coverage for percent-encoded path segments and invalid percent escapes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@enotniy
enotniy merged commit 7fd006c into develop Jul 24, 2026
8 checks passed
@enotniy
enotniy deleted the feature/MOBILE-258-fix-regex branch July 24, 2026 08:02
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