Skip to content

Validator mutates internal state in PersonalData::isValid causing side effects #11895

Closed

Description

@Akash504-ai

👟 Reproduction steps

  1. Create an instance of PersonalData validator with user data (e.g., userId, email)
  2. Call isValid() once with any password
  3. Call isValid() again on the same instance
  4. Observe that internal properties (userId, email, etc.) are modified (lowercased) after first call

👍 Expected behavior

The validator should not modify its internal state. Calling isValid() multiple times on the same instance should produce consistent behavior without side effects.

👎 Actual Behavior

The isValid() method mutates internal properties (userId, email, name, phone) by converting them to lowercase when strict is false. This introduces side effects and makes the validator stateful.

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Windows

🧱 Your Environment

Local development setup using the Appwrite repository codebase. No custom modifications. Local development setup using the Appwrite repository (1.9.x branch).
Issue found in source code (src/Appwrite/Auth/Validator/PersonalData.php), not tested on Appwrite Cloud.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. added theissue type on Apr 14, 2026
  2. added
    product / messaging
    product / vcs
    on Apr 14, 2026
  3. aoimizuno commented on Apr 17, 2026

    @aoimizuno

    Hello, may I fix this issue? It's still working?

  4. Akash504-ai commented on Apr 19, 2026

    @Akash504-ai
    Author

    Thanks @aoimizuno! I have already opened a PR for this (#11896), feel free to take a look.

  5. HarshMN2345 commented on Sep 8, 2026

    @HarshMN2345
    Member

    fixed in #13532, closing

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    product / messagingproduct / vcs

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions