wp-graphql-cache icon indicating copy to clipboard operation
wp-graphql-cache copied to clipboard

Transient key conflict

Open colis opened this issue 3 years ago • 0 comments

Hi,

I've spotted an error in the get_transient_key method of the Transient class which could cause a cache key conflict.

Basically the sprintf on line 220

$transient_key = sprintf(
	'wp-graphql-cache-%s',
	md5($zone),
	md5($cache_key)
);

has only one placeholder, therefore the hashed value of the $cache_key is never included in the transient key.

colis avatar Jan 27 '22 17:01 colis