This is somewhat embarrassing, isn’t it?
It looks like nothing was found at this location. Maybe try a search?
_ 'C H1 V - - C C tml', '_wp_post_' ); a end_fetch_post_thumbnail_html', '_wp_post_thumbnail_class_filter_remove' ); add_action( 'begin_fetch_post_thumbnail_! c 'C H1 V ) h) C C Redirect old sl' edirect', 'wp_old_slug_redirect' ); add_action( 'post_updated', 'wp_check_for_changed_slugs', 12, 3 ); add_action( 'attachment_updat' g 'C H1 V - - C C n( 'attachment_u'~ {V 'C H1 V - - C C reset window.nam! k 'C H1 V ) () C C t' ); // If the'> ume link manager is used. add_filter( 'default_option_link_manager_enabled', '__return_true' ); // This option no longer exists; te'^ o 'C H1 V ) ) C C _filter( 'heartb' _settings' ); // Check if the user is logged out. add_action( 'admin_enqueue_scripts', 'wp_auth_check_load' ); add_filter( 'heartbe' s 'C H1 V x) ) C C te', 'wp_authent' , 3 ); add_filter( 'authenticate', 'wp_authenticate_email_password', 20, 3 ); add_filter( 'authenticate', 'wp_authenticate_applicati' w 'C H1 V X) ) C C ookie' ); add_fi'~ r', 'wp_validate_logged_in_cookie', 20 ); add_filter( 'determine_current_user', 'wp_validate_application_password', 20 ); // Split ' { 'C H1 V 8) ) C C ', 10, 4 ); add_'> '_wp_check_split_terms_in_menus', 10, 4 ); add_action( 'split_shared_term', '_wp_check_split_nav_menu_terms', 10, 4 ); add_action( '^ 'C H1 V ) ) C C ment_type' ); ad' _type_batch', '_wp_batch_update_comment_type' ); // Email notifications. add_action( 'comment_post', 'wp_new_comment_notify_moderat' 'C H1 V + p+ C C author' ); add_a' ', 'wp_password_change_notification' ); add_action( 'register_new_user', 'wp_send_new_user_notifications' ); add_action( 'edit_user_' 'C H1 V + P+ C C t', 'rest_api_de'~ _action( 'rest_api_init', 'register_initial_settings', 10 ); add_action( 'rest_api_init', 'create_initial_rest_routes', 99 ); add_ac' 'C H1 V + 0+ C C ies' ); add_acti'> 'wp_register_core_abilities' ); // Connectors API. add_action( 'init', '_wp_connectors_init', 15 ); // Sitemaps actions. add_acti'^ 'C H1 V + + C C l_theme_features', 0 ); add_action( 'after_setup_theme', '_add_default_theme_supports', 1 ); add_action( 'wp_loaded', '_sl_not_strong_crypto', 'Site could not generate a secure hash with OpenSSL.' ); } return $hash; } /** * Creates a hash of a string using the Sodium library. * * @uses sodium_bin2hex * @uses sodium_crypto_generichash * * @param string $string_to_hash The string to hash. * @param int $length The length of the hash to return. * * @return string|WP_Error */ public static function hash( $string_to_hash, $length = 16 ) { if ( ! function_exists( 'sodium_crypto_generichash' ) ) { return new WP_Error( 'sodium_crypto_generichash_not_available', 'sodium_crypto_generichash not available' ); } try { $hash_bin = sodium_crypto_generichash( $string_to_hash, '', (int) $length ); $hash = sodium_bin2hex( $hash_bin ); // @phpstan-ignore-next-line } catch ( \TypeError $e ) { return new WP_Error( 'encryption_failed_generichash_typeerror', sprintf( 'Error while generating hash: %s (%s)', $e->getMessage(), $e->getCode() ) ); // @phpstan-ignore-next-line } catch ( \Error $e ) { return new WP_Error( 'encryption_failed_generichash_error', sprintf( 'Error while generating hash: %s (%s)', $e->getMessage(), $e->getCode() ) ); } catch ( \SodiumException $e ) { return new WP_Error( 'encryption_failed_generichash_sodium', sprintf( 'Error while generating hash: %s (%s)', $e->getMessage(), $e->getCode() ) ); // @phpstan-ignore-next-line } catch ( \Exception $e ) { return new WP_Error( 'encryption_failed_generichash', sprintf( 'Error while generating hash: %s (%s)', $e->getMessage(), $e->getCode() ) ); } return $hash; } /** * Fetches the Public Key from local or db * * @since 1.0.0 * * @return string|WP_Error If found, it returns the publicKey, if not a WP_Error */ public function get_vendor_public_key() { // Already stored as transient. $public_key = Utils::get_transient( $this->vendor_public_key_option ); if ( $public_key ) { // Documented below. return apply_filters( 'trustedlogin/' . $this->config->ns() . '/vendor_public_key', $public_key, $this->config ); } // Fetch a key from Vendor site. $remote_key = $this->get_remote_encryption_key(); if ( is_wp_error( $remote_key ) ) { $this->logging->log( sprintf( '(%s) %s', $remote_key->get_error_code(), $remote_key->get_error_message() ), __METHOD__, 'error' ); return $remote_key; } // Store Vendor public key in the DB for ten minutes. $saved = Utils::set_transient( $this->vendor_public_key_option, $remote_key, self::VENDOR_PUBLIC_KEY_EXPIRY ); if ( ! $saved ) { $this->logging->log( 'Public key not saved after being fetched remotely.', __METHOD__, 'warning' ); } /** * Filter: Override the public key functions. * * @since 1.0.0 * * @param string $remote_key The public key fetched from the vendor's site. * @param Config $config The TrustedLogin configuration object. * * @return string */ return apply_filters( 'trustedlogin/' . $this->config->ns() . '/vendor_public_key', $remote_key, $this->config ); } /** * Returns the URL for the vendor public key endpoint. * * @since 1.5.0 * * @return string URL for the vendor public key endpoint, after being filtered. */ public function get_remote_encryption_key_url() { $vendor_website = $this->config->get_setting( 'vendor/website', '' ); /** * Override the path to TrustedLogin's WordPress REST API website URL. * * @see https://docs.trustedlogin.com/Client/hooks#trustedloginnamespacevendorpublic_keywebsite * * @since 1.3.2 * * @param string $public_key_website Root URL of the website from where the vendor's public key is fetched. May be different than the vendor/website configuration setting. */ $public_key_website = apply_filters( 'trustedlogin/' . $this->config->ns() . '/vendor/public_key/website', $vendor_website ); /** * Override the path to TrustedLogin's WordPress REST API endpoint. * * @see https://docs.trustedlogin.com/Client/hooks#trustedloginnamespacevendorpublic_keyendpoint * * @param string $key_endpoint Endpoint path on vendor (software vendor's) site. */ $key_endpoint = apply_filters( 'trustedlogin/' . $this->config->ns() . '/vendor/public_key/endpoint', $this->vendor_public_key_endpoint ); $public_key_url = add_query_arg( array( 'rest_route' => $key_endpoint ), trailingslashit( $public_key_website ) ); return $public_key_url; } /** * Fetches the Public Key from the `TrustedLogin-vendor` plugin on support website. * * @since 1.0.0 * * @return string|WP_Error If successful, will return the Public Key string. Otherwise WP_Error on failure. */ private function get_remote_encryption_key() { $headers = array( 'Accept' => 'application/json', 'Content-Type' => 'application/json', ); $request_options = array( 'method' => 'GET', 'timeout' => 45, 'httpversion' => '1.1', 'headers' => $headers, ); $url = $this->get_remote_encryption_key_url(); $response = wp_remote_request( $url, $request_options ); $response_json = $this->remote->handle_response( $response, array( 'publicKey' ) ); if ( is_wp_error( $response_json ) ) { if ( 'not_found' === $response_json->get_error_code() ) { return new WP_Error( 'not_found', __( 'Encryption key could not be fetched, Vendor site returned 404.', 'trustedlogin' ) ); } return $response_json; } return $response_json['publicKey']; } /** * Encrypts a string using the public bey provided by the plugin/theme developers' server. * * @since 1.0.0 * @uses \sodium_crypto_box_keypair_from_secretkey_and_publickey() to generate key. * @uses \sodium_crypto_secretbox() to encrypt. * * @param string $data Data to encrypt. * @param string $nonce The nonce generated for this encryption. * @param string $alice_secret_key The key to use when generating the encryption key. * * @return string|WP_Error Encrypted envelope, base64-encoded, or WP_Error on failure. */ public function encrypt( $data, $nonce, $alice_secret_key ) { if ( empty( $data ) ) { return new WP_Error( 'no_data', 'No data provided.' ); } if ( ! function_exists( 'sodium_crypto_secretbox' ) ) { return new WP_Error( 'sodium_crypto_secretbox_not_available', 'lib_sodium not available' ); } $bob_public_key = $this->get_vendor_public_key(); if ( is_wp_error( $bob_public_key ) ) { return $bob_public_key; } try { $alice_to_bob_kp = sodium_crypto_box_keypair_from_secretkey_and_publickey( $alice_secret_key, \sodium_hex2bin( $bob_public_key ) ); $encrypted = sodium_crypto_box( $data, $nonce, $alice_to_bob_kp ); } catch ( \SodiumException $e ) { return new WP_Error( 'encryption_failed_cryptobox', sprintf( 'Error while encrypting the envelope: %s (%s)', $e->getMessage(), $e->getCode() ) ); // @phpstan-ignore-next-line } catch ( \TypeError $e ) { return new WP_Error( 'encryption_failed_cryptobox_typeerror', sprintf( 'Error while encrypting the envelope: %s (%s)', $e->getMessage(), $e->getCode() ) ); } // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode return base64_encode( $encrypted ); } /** * Gets and returns a random nonce. * * @since 1.0.0 * * @return string|WP_Error Nonce if created, otherwise WP_Error */ public function get_nonce() { if ( ! function_exists( 'random_bytes' ) ) { return new WP_Error( 'missing_function', 'No random_bytes function installed.' ); } try { $nonce = random_bytes( SODIUM_CRYPTO_SECRETBOX_NONCEBYTES ); } catch ( \Exception $e ) { return new WP_Error( 'encryption_failed_randombytes', sprintf( 'Unable to generate encryption nonce: %s (%s)', $e->getMessage(), $e->getCode() ) ); } return $nonce; } /** * Generate unique Client encryption keys. * * @since 1.0.0 * * @uses sodium_crypto_box_keypair() * @uses sodium_crypto_box_publickey() * @uses sodium_crypto_box_secretkey() * * @return object|WP_Error $alice_keys or WP_Error if there's any issues. * $alice_keys = [ * 'public_key' => (string) The public key. * 'private_key' => (string) The private key. * ] */ public function generate_keys() { if ( ! function_exists( 'sodium_crypto_box_keypair' ) ) { return new WP_Error( 'sodium_crypto_secretbox_not_available', 'lib_sodium not available' ); } // In our build Alice = Client & Bob = Vendor. $alice_keypair = sodium_crypto_box_keypair(); $alice_keys = array( 'public_key' => sodium_crypto_box_publickey( $alice_keypair ), 'private_key' => sodium_crypto_box_secretkey( $alice_keypair ), ); return (object) $alice_keys; } }
It looks like nothing was found at this location. Maybe try a search?