Index: wp-admin/includes/file.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- wp-admin/includes/file.php (date 1557259254000) +++ wp-admin/includes/file.php (date 1557411163494) @@ -1199,6 +1199,32 @@ } + if ( + ! extension_loaded( 'sodium' ) && + ! ParagonIE_Sodium_Compat::polyfill_is_fast() + ) { + $max = ini_get('max_execution_time'); + if ($max > 0 && $max < 40) { + // This cannot be performed in a reasonable amount of time + // https://github.com/paragonie/sodium_compat#help-sodium_compat-is-slow-how-can-i-make-it-fast + + return new WP_Error( + 'signature_verification_unsupported', + sprintf( + /* translators: 1: The filename of the package. */ + __('The authenticity of %1$s could not be verified as signature verification is unavailable on this system.'), + '' . esc_html($filename_for_errors) . '' + ), + array( + 'php' => phpversion(), + 'sodium' => defined('SODIUM_LIBRARY_VERSION') ? SODIUM_LIBRARY_VERSION : (defined('ParagonIE_Sodium_Compat::VERSION_STRING') ? ParagonIE_Sodium_Compat::VERSION_STRING : false), + 'polyfill-is-fast' => false, + 'max-execution-time' => $max + ) + ); + } + } + if ( ! $signatures ) { return new WP_Error( 'signature_verification_no_signature',