Skip to content
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

When meta key not found, all meta will be returned #894

Open
erikdemarco opened this issue Oct 1, 2024 · 0 comments
Open

When meta key not found, all meta will be returned #894

erikdemarco opened this issue Oct 1, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@erikdemarco
Copy link

erikdemarco commented Oct 1, 2024

Describe the bug
when we want to query metadata by key it will return all meta if our requested key not found. is this a bug? or its the normal behaviour, imagine we store sensitive data in meta, all will be shown publicly naked

To Reproduce
Steps to reproduce the behavior:
1.install woocommerce
2. import products
3. add "testing" meta to 1 latest product
4. query like this:

query NewQuery {
  products(where: {type: SIMPLE}, first: 5) {
    edges {
      node {
        ... on SimpleProduct {
          name
        }
        metaData(key: "testing") {
          value
          key
        }
      }
    }
  }
}
  1. now query any invalid meta key. example:
query NewQuery {
  products(where: {type: SIMPLE}, first: 5) {
    edges {
      node {
        ... on SimpleProduct {
          name
        }
        metaData(key: "testing123") {
          value
          key
        }
      }
    }
  }
}

Expected behavior
should not show data we not requested

Screenshots
when meta key found:
Screenshot_2024-10-01_09-55-56

when meta key not found:
Screenshot_2024-10-01_10-00-16

Desktop (please complete the following information):

  • OS: linuxmint
  • Browser ms edge
  • Version Version 128.0.2739.54 (Official build) (64-bit)

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Plugin Versions

  • WooGraphQL Version:
  • WPGraphQL Version:
  • WordPress Version:
  • WooCommerce Version:

Additional context
Add any other context about the problem here.

@erikdemarco erikdemarco changed the title "_wpcom_is_markdown" always included when meta key not found When meta key not found, all meta will be returned Oct 1, 2024
@kidunot89 kidunot89 added the bug Something isn't working label Oct 2, 2024
@kidunot89 kidunot89 added this to the v0.21.1 milestone Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants