Skip to content

Fix bug #69280: SoapClient classmap doesn't support fully qualified class name #14398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

nielsdos
Copy link
Member

There's a hash table that maps type names to class name, but names with
a leading backslash are not supported. The engine has logic to strip
away the leading backslash that we should replicate here.

It works by checking if we need to make an actual copy in case an
unexpected (e.g. invalid data or leading backslash) situations are
detected. Upon making a copy we normalize the data in the table.

Furthermore, previously the code assumed that the key was always valid
and that the structure was a non-packed hash table. This isn't
necessarily the case. The new code fixes this as well.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Logic LGTM just got one tiny question

…lass name

There's a hash table that maps type names to class name, but names with
a leading backslash are not supported. The engine has logic to strip
away the leading backslash that we should replicate here.

It works by checking if we need to make an actual copy in case an
unexpected (e.g. invalid data or leading backslash) situations are
detected. Upon making a copy we normalize the data in the table.

Furthermore, previously the code assumed that the key was always valid
and that the structure was a non-packed hash table. This isn't
necessarily the case. The new code fixes this as well.

Closes phpGH-14398.
@nielsdos nielsdos merged commit 4767061 into php:PHP-8.2 Jun 1, 2024
8 of 9 checks passed
nielsdos added a commit that referenced this pull request Jun 1, 2024
* PHP-8.2:
  Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
nielsdos added a commit that referenced this pull request Jun 1, 2024
* PHP-8.3:
  Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
nielsdos added a commit that referenced this pull request Aug 7, 2024
…lified class name (#14398)"

This reverts commit 4767061.

Although the fix is correct, people are relying on the bug and their
code stopped working, see GH-15252.
nielsdos added a commit that referenced this pull request Aug 7, 2024
* PHP-8.2:
  Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
nielsdos added a commit that referenced this pull request Aug 7, 2024
* PHP-8.3:
  Revert "Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants