You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use wp_hash( $subscription->get_id() ) for an unique hash in a public URL, if users generate new salts (https://api.wordpress.org/secret-key/1.1/salt/) the old public links will also no longer work.
Intuitively I think we should move away from the key property and use dynamically generated hashes that can be invalidated by setting new secret keys (https://api.wordpress.org/secret-key/1.1/salt/).
The key is currently used in i think return, redirect and subscription action URLs:
Now old payments without key/hash were also allowed through, but for the future we can always require a hash? How bad is it that a return/redirect URL of an old payment no longer works?
@rvdsteege How should we name this in JSON?
Is just
key
clear enough?$payment->get_key()
$payment->set_key( $key )
Or should we put this away in
meta
? Did we borrow the concept of akey
from WooCommerce orders?In #201 (comment) i also describe a rewrite rule like:
Also with the note:
In https://docs.google.com/spreadsheets/d/1CJHnHcr9s8lkh4Fq9HQmlAThCK69eXiTC3UktyeQKYw/edit?usp=sharing we also suggested to store the
key
inwp_posts.post_password
.There is no index on the
wp_posts.post_password
so maybewp_posts.post_name
is even a better choice?The current payment/subscription key is also not a
wp_hash( $subscription->get_id() )
key.The text was updated successfully, but these errors were encountered: