batcache icon indicating copy to clipboard operation
batcache copied to clipboard

Use negative lookahead to allow openssl_* functions

Open dero opened this issue 7 years ago • 0 comments

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.

dero avatar May 11 '17 11:05 dero