-
Notifications
You must be signed in to change notification settings - Fork 69
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
Querying order by meta key with empty value returns an order. #4393
Comments
@shendy-a8c The code for |
This issue is still valid. I just tested by following these steps:
It should not be like that. |
@jessy-p is this issue something @Automattic/gamma can / should do? |
Removing @naman03malhotra can you add this Gamma's backlog? (maybe it's already there!) |
Thanks @haszari. I am going to move it to the proper Gamma queue for prioritiazation. |
Describe the bug
order_id_from_meta_key_value() when passed with empty value, will return some order id, which is unexpected and potentially expose a security problem.
To Reproduce
/disputes/{dispute_id}
route will match first.I actually bumped into this bug by accident when working on my PR and I'm not sure if this bug affects UX or exploitable because going to a dispute page with invalid id, eg
/wp-admin/admin.php?page=wc-admin&path=%2Fpayments%2Fdisputes%2Fdetails&id=something
, doesn't let me through.Additional context
I found that WC_Payments_API_Client::get_dispute() calls add_order_info_to_object() with a null
$charge_id
which will eventually calls order_from_charge_id().The text was updated successfully, but these errors were encountered: