The vary_cache_on_function method will disallow all functions containing the substring open. This is likely to prevent the user from creating functions that use fopen, opendir and similar. However it also prevents users from using all functions from the openssl_* family.
Our use case is the following:
On a VIP site we want to differentiate cache variants for premium and non-premium users.
We want to be able to use openssl_decrypt to decrypt a userdata cookie and then we set the variant based on whether the current user has purchased a subscription or not.
This PR adds a negative lookahead to allow the openssl_* functions inside vary_cache_on_function.
The
vary_cache_on_function
method will disallow all functions containing the substringopen
. This is likely to prevent the user from creating functions that usefopen
,opendir
and similar. However it also prevents users from using all functions from theopenssl_*
family.Our use case is the following:
openssl_decrypt
to decrypt a userdata cookie and then we set the variant based on whether the current user has purchased a subscription or not.This PR adds a negative lookahead to allow the
openssl_*
functions insidevary_cache_on_function
.