← All changes
|
src/myyoast-client/infrastructure/crypto/encryption.php
+1
-1
27.7
→
trunk
View file →
| @@ -112,9 +112,9 @@ | ||
| 112 | 112 | if ( ! \function_exists( 'sodium_crypto_secretbox' ) ) { |
| 113 | 113 | throw new Encryption_Exception( 'The sodium PHP extension is required but not available.' ); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - if ( ! \defined( 'AUTH_KEY' ) || \AUTH_KEY === '' || \AUTH_KEY === 'put your unique phrase here' ) { | |
| 116 | + if ( ! \defined( 'AUTH_KEY' ) || ! \is_string( \AUTH_KEY ) || \AUTH_KEY === '' || \AUTH_KEY === 'put your unique phrase here' ) { | |
| 117 | 117 | throw new Encryption_Exception( 'AUTH_KEY is not configured. Please set a unique AUTH_KEY in wp-config.php.' ); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | return \hash_hkdf( 'sha256', \AUTH_KEY, \SODIUM_CRYPTO_SECRETBOX_KEYBYTES, $context ); |