Changeset 2009749
- Timestamp:
- 01/10/2019 10:51:40 AM (7 years ago)
- Location:
- perfectdashboard/trunk
- Files:
-
- 18 edited
-
Cms/Wordpress/Api.php (modified) (1 diff)
-
Cms/Wordpress/Task/GetExtensions.php (modified) (2 diffs)
-
Cms/Wordpress/Task/PostExtensionUpdate.php (modified) (11 diffs)
-
Cms/Wordpress/Upgrader/Skin/Languagepack.php (modified) (3 diffs)
-
app/Admin.php (modified) (1 diff)
-
lib/src/Authentication.php (modified) (1 diff)
-
lib/src/Backuptool.php (modified) (1 diff)
-
lib/src/Exception/Response.php (modified) (2 diffs)
-
lib/src/Response.php (modified) (1 diff)
-
lib/src/vendor/composer/installed.json (modified) (2 diffs)
-
lib/src/vendor/paragonie/sodium_compat/README.md (modified) (3 diffs)
-
lib/src/vendor/paragonie/sodium_compat/appveyor.yml (modified) (1 diff)
-
lib/src/vendor/paragonie/sodium_compat/lib/php72compat.php (modified) (3 diffs)
-
lib/src/vendor/paragonie/sodium_compat/src/Compat.php (modified) (1 diff)
-
lib/src/vendor/paragonie/sodium_compat/src/Core32/Curve25519.php (modified) (6 diffs)
-
perfectdashboard.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
-
tmpl/configuration_form_advanced_fields.tmpl.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
perfectdashboard/trunk/Cms/Wordpress/Api.php
r1908589 r2009749 12 12 if (defined('DOING_AJAX')) 13 13 { 14 add_action('wp_ajax_autoupdater_api', array($this, 'handle') );15 add_action('wp_ajax_nopriv_autoupdater_api', array($this, 'handle') );14 add_action('wp_ajax_autoupdater_api', array($this, 'handle'), 10); 15 add_action('wp_ajax_nopriv_autoupdater_api', array($this, 'handle'), 10); 16 16 } 17 17 } 18 18 else 19 19 { 20 add_action('init', array($this, 'handle'), 1); 20 $priority = (isset($_REQUEST['pd_endpoint']) && $_REQUEST['pd_endpoint'] === 'extension/update') ? 10 : 1; 21 add_action('init', array($this, 'handle'), $priority); 21 22 } 22 23 } -
perfectdashboard/trunk/Cms/Wordpress/Task/GetExtensions.php
r1973381 r2009749 132 132 $pagenow = 'update-core.php'; 133 133 134 // get updates for exceptional extensions (it must be called here) 135 if (!class_exists(AutoUpdater_Loader::getClassPrefix() . 'Cms_Wordpress_Helper_Extension')) 136 { 137 require_once AUTOUPDATER_WP_PLUGIN_PATH . 'Cms/Wordpress/Helper/Extension.php'; 138 } 139 AutoUpdater_Cms_Wordpress_Helper_Extension::loadMasterSliderPro(); 140 134 141 if (!class_exists(AutoUpdater_Loader::getClassPrefix() . 'Cms_Wordpress_Helper_Tracker')) 135 142 { … … 149 156 150 157 // find updates 158 // do it two times, so all data will be correctly filled after deleting whole site_transient for update_plugins and update_themes 159 // looks redundant, but for sure after calling wp_update only once there's no "checked" property in update_plugins and update_themes transients 160 // and available updates of some plugins are missing in "response" property of these transients 151 161 wp_update_plugins(); 162 wp_update_plugins(); 163 wp_update_themes(); 152 164 wp_update_themes(); 153 165 -
perfectdashboard/trunk/Cms/Wordpress/Task/PostExtensionUpdate.php
r1932005 r2009749 10 10 public function doTask() 11 11 { 12 $type = $this->input('type');13 $slug = $this->input('slug');12 $type = strtolower($this->input('type')); 13 $slug = strtolower($this->input('slug')); 14 14 $path = $this->input('path'); 15 15 … … 113 113 require_once $upgrader_path . 'Skin/Plugin.php'; 114 114 115 $data = get_file_data(WP_PLUGIN_DIR . '/' . $slug, array('Version' => 'Version')); 115 if (!$path && !get_site_transient('update_plugins')) { 116 // do it two times, so all data will be correctly filled 117 wp_update_plugins(); 118 wp_update_plugins(); 119 } 120 121 if (!$path && strpos($slug, 'masterslider.php') !== false) { 122 // prepare update of exceptional plugins 123 if (!class_exists(AutoUpdater_Loader::getClassPrefix() . 'Cms_Wordpress_Helper_Extension')) 124 { 125 require_once AUTOUPDATER_WP_PLUGIN_PATH . 'Cms/Wordpress/Helper/Extension.php'; 126 } 127 AutoUpdater_Cms_Wordpress_Helper_Extension::loadMasterSliderPro(); 128 } 129 130 $plugin_path = WP_PLUGIN_DIR . '/' . $slug; 131 if (!$filemanager->exists($plugin_path)) 132 { 133 $slug = $this->getPluginRealSlug($slug); 134 if (!$slug) 135 { 136 throw AutoUpdater_Exception_Response::getException( 137 200, $response['message'], 138 'no_update_warning', 'No update was performed, plugin directory not found' 139 ); 140 } 141 $plugin_path = WP_PLUGIN_DIR . '/' . $slug; 142 } 143 144 $data = get_file_data($plugin_path, array('Version' => 'Version')); 116 145 $old_version = $data['Version']; 117 146 … … 138 167 compact('nonce', 'url', 'plugin', 'type') 139 168 )); 140 $result = $path ? $upgrader->install($path) : $upgrader->upgrade($slug); 141 $output = ob_get_clean(); 142 143 $data = get_file_data(WP_PLUGIN_DIR . '/' . $slug, array('Version' => 'Version')); 169 // don't clear update cache, so next plugin's update step in same action will be able to use update cache data 170 $result = $path ? $upgrader->install($path, array('clear_update_cache' => false)) : $upgrader->upgrade($slug, array('clear_update_cache' => false)); 171 $output = ob_get_clean(); 172 173 $data = get_file_data($plugin_path, array('Version' => 'Version')); 144 174 $new_version = $data['Version']; 145 175 break; … … 151 181 require_once $upgrader_path . 'Skin/Theme.php'; 152 182 153 $data = get_file_data(WP_CONTENT_DIR . '/themes/' . $slug . '/style.css', array('Version' => 'Version')); 183 if (!$path && !get_site_transient('update_themes')) { 184 // do it two times, so all data will be correctly filled 185 wp_update_themes(); 186 wp_update_themes(); 187 } 188 189 $theme_path = WP_CONTENT_DIR . '/themes/' . $slug . '/style.css'; 190 if (!$filemanager->exists($theme_path)) 191 { 192 $theme_path = $this->getThemeRealPath($slug); 193 if (!$theme_path) 194 { 195 throw AutoUpdater_Exception_Response::getException( 196 200, $response['message'], 197 'no_update_warning', 'No update was performed, theme directory not found' 198 ); 199 } 200 } 201 202 $data = get_file_data($theme_path, array('Version' => 'Version')); 154 203 $old_version = $data['Version']; 155 204 … … 176 225 compact('nonce', 'url', 'theme', 'type') 177 226 )); 178 $result = $path ? $upgrader->install($path) : $upgrader->upgrade($slug); 179 $output = ob_get_clean(); 180 181 $data = get_file_data(WP_CONTENT_DIR . '/themes/' . $slug . '/style.css', array('Version' => 'Version')); 227 // don't clear update cache, so next theme's update step in same action will be able to use update cache data 228 $result = $path ? $upgrader->install($path, array('clear_update_cache' => false)) : $upgrader->upgrade($slug, array('clear_update_cache' => false)); 229 $output = ob_get_clean(); 230 231 $data = get_file_data($theme_path, array('Version' => 'Version')); 182 232 $new_version = $data['Version']; 183 233 break; … … 200 250 compact('url', 'nonce', 'context') 201 251 )); 202 $result = $upgrader->bulk_upgrade(); 203 $output = ob_get_clean(); 252 // don't clear update cache, so next extension's update step in same action will be able to use update cache data 253 $result = $upgrader->bulk_upgrade(array(), array('clear_update_cache' => false)); 254 $output = ob_get_clean(); 204 255 205 256 // returns an array of results on success, or true if there are no updates … … 212 263 $result = new WP_Error('up_to_date', 'There are no translations updates'); 213 264 } 265 266 /** @see AutoUpdater_Cms_Wordpress_Upgrader_Skin_Languagepack::get_translations() */ 267 $translations = $upgrader->skin->get_translations(); 268 if (!empty($translations)) 269 { 270 $response['translations'] = $translations; 271 } 214 272 } 215 273 else … … 221 279 $filemanager->clearPhpCache(); 222 280 281 /** @see AutoUpdater_Cms_Wordpress_Upgrader_Skin_Core::get_errors() */ 223 282 $errors = isset($upgrader) ? $upgrader->skin->get_errors() : array(); 224 283 if (is_wp_error($result)) … … 234 293 )) 235 294 { 236 return array( 237 'success' => true, 238 'message' => $errors['up_to_date'] != 'up_to_date' ? $errors['up_to_date'] : 'Up-to-date' 239 ); 295 $response['success'] = true; 296 $response['message'] = $errors['up_to_date'] != 'up_to_date' ? $errors['up_to_date'] : 'Up-to-date'; 297 return $response; 240 298 } 241 299 elseif (array_key_exists('no_package', $errors)) … … 263 321 if ($result === true || is_null($result)) 264 322 { 265 return array(266 'success' => true,267 );323 $response['success'] = true; 324 unset($response['message']); 325 return $response; 268 326 } 269 327 elseif (!is_null($result) && !is_bool($result)) … … 300 358 301 359 return $response; 360 } 361 362 /** 363 * @param string $slug 364 * 365 * @return string|null 366 */ 367 protected function getPluginRealSlug($slug) 368 { 369 $plugins_dirs = glob(WP_PLUGIN_DIR . '/*'); 370 foreach ($plugins_dirs as $dir) 371 { 372 $dir = basename($dir); 373 374 // Single file plugin 375 if (strpos($slug, '/') === false) 376 { 377 if (strtolower($dir) === $slug) 378 { 379 return $dir; 380 } 381 continue; 382 } 383 384 // Plugin in directory 385 if (strtolower($dir) === dirname($slug)) 386 { 387 $plugin_files = glob(WP_PLUGIN_DIR . '/' . $dir . '/*.php'); 388 foreach ($plugin_files as $file) 389 { 390 $slug_file = basename($slug); 391 if (strtolower($file) === $slug_file) 392 { 393 return $dir . '/' . $file; 394 } 395 continue; 396 } 397 } 398 } 399 400 return null; 401 } 402 403 /** 404 * @param string $slug 405 * 406 * @return string|null 407 */ 408 protected function getThemeRealPath(&$slug) 409 { 410 // Theme in directory: wp-themes/slug 411 $files = glob(WP_CONTENT_DIR . '/themes/*/style.css'); 412 foreach ($files as $file) 413 { 414 $slug_based_on_file = basename(dirname($file)); 415 // Is directory before style.css file the same as slug? 416 if (strtolower($slug_based_on_file) === $slug) 417 { 418 $slug = $slug_based_on_file; 419 return $file; 420 } 421 } 422 423 // Theme in subdirectory: wp-themes/slug-1.0.0/slug 424 $files = glob(WP_CONTENT_DIR . '/themes/*/*/style.css'); 425 foreach ($files as $file) 426 { 427 $slug_based_on_file = basename(dirname($file)); 428 // Is directory before style.css file the same as slug? 429 if (strtolower($slug_based_on_file) === $slug) 430 { 431 $slug = $slug_based_on_file; 432 return $file; 433 } 434 } 435 436 return null; 302 437 } 303 438 -
perfectdashboard/trunk/Cms/Wordpress/Upgrader/Skin/Languagepack.php
r1908589 r2009749 11 11 12 12 protected $errors = array(); 13 14 protected $translations = array(); 13 15 14 16 public function header() … … 69 71 } 70 72 73 /** 74 * PD: Get a list of updated translations 75 * 76 * @return array 77 */ 78 public function get_translations() 79 { 80 return $this->translations; 81 } 82 71 83 public function feedback($string) 72 84 { … … 79 91 public function after() 80 92 { 93 /** @var object $update */ 94 $update = $this->language_update; 95 $slug = $update->type == 'core' ? 'wordpress' : $update->slug; 96 97 $this->translations[] = sprintf('%s %s %s %s released at %s' 98 , ucfirst($update->type) 99 , $slug 100 , $update->version 101 , $update->language 102 , $update->updated 103 ); 81 104 } 82 105 -
perfectdashboard/trunk/app/Admin.php
r1962848 r2009749 239 239 $write_token = AutoUpdater_Config::get('write_token'); 240 240 $aes_key = AutoUpdater_Config::get('aes_key'); 241 $expires_at = AutoUpdater_Config::get('token_expires_at');242 241 $offline = AutoUpdater_Config::get('offline', 0); 243 242 $ssl_verify = AutoUpdater_Config::get('ssl_verify', 0); -
perfectdashboard/trunk/lib/src/Authentication.php
r1946575 r2009749 46 46 } 47 47 48 if ($method == 'post' && ($token_expires_at = AutoUpdater_Config::get('token_expires_at')))49 {50 $expires_at = new DateTime($token_expires_at);51 $now = new DateTime();52 53 $diff_in_seconds = $now->getTimestamp() - $expires_at->getTimestamp();54 if ($diff_in_seconds > 0)55 {56 AutoUpdater_Log::debug('Write token has expired');57 throw new Exception('Token has expired', 403);58 }59 }60 61 48 return true; 62 49 } -
perfectdashboard/trunk/lib/src/Backuptool.php
r1974720 r2009749 39 39 { 40 40 return null; 41 } 42 43 if (!is_dir(AUTOUPDATER_ROOT_PATH . $backuptool_dir) 44 && is_dir(AUTOUPDATER_ROOT_PATH . '../' . $backuptool_dir)) 45 { 46 // Backup Tool might be one level above the website 47 return dirname(AUTOUPDATER_ROOT_PATH) . '/' . $backuptool_dir . '/'; 41 48 } 42 49 -
perfectdashboard/trunk/lib/src/Exception/Response.php
r1883279 r2009749 26 26 27 27 /** 28 * @param int $code 29 * @param string $message 30 * @param int $error_code 31 * @param string $error_message 32 * 33 * @return AutoUpdater_Exception_Response 34 */ 35 public static function getException($code = 0, $message = '', $error_code = 0, $error_message = '') 36 { 37 $e = new AutoUpdater_Exception_Response($message, $code); 38 $e->setError($error_code, $error_message); 39 40 return $e; 41 } 42 43 /** 28 44 * @param mixed $code 29 45 * @param string $message 46 * 47 * @return $this 30 48 */ 31 49 public function setError($code, $message) … … 33 51 $this->error_code = $code; 34 52 $this->error_message = $message; 53 54 return $this; 35 55 } 36 56 -
perfectdashboard/trunk/lib/src/Response.php
r1883279 r2009749 217 217 { 218 218 $this->body = array( 219 'data' => $this->data, 220 'metadata' => array( 221 'version' => AUTOUPDATER_VERSION, 222 ) 219 'data' => $this->data 220 ); 221 } 222 223 if (is_array($this->body) && !isset($this->body['metadata'])) 224 { 225 $this->body['metadata'] = array( 226 'version' => AUTOUPDATER_VERSION 223 227 ); 224 228 } -
perfectdashboard/trunk/lib/src/vendor/composer/installed.json
r1946575 r2009749 52 52 { 53 53 "name": "paragonie/sodium_compat", 54 "version": "v1. 7.0",55 "version_normalized": "1. 7.0.0",54 "version": "v1.8.1", 55 "version_normalized": "1.8.1.0", 56 56 "source": { 57 57 "type": "git", 58 58 "url": "https://github.com/paragonie/sodium_compat.git", 59 "reference": " 7b73005be3c224f12c47bd75a23ce24b762e47e8"59 "reference": "57bb5ef079d3724148da3d5c99e30695ab17afda" 60 60 }, 61 61 "dist": { 62 62 "type": "zip", 63 "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/ 7b73005be3c224f12c47bd75a23ce24b762e47e8",64 "reference": " 7b73005be3c224f12c47bd75a23ce24b762e47e8",63 "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/57bb5ef079d3724148da3d5c99e30695ab17afda", 64 "reference": "57bb5ef079d3724148da3d5c99e30695ab17afda", 65 65 "shasum": "" 66 66 }, … … 76 76 "ext-sodium": "PHP >= 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security." 77 77 }, 78 "time": "201 8-09-22T03:59:58+00:00",78 "time": "2019-01-03T21:00:55+00:00", 79 79 "type": "library", 80 80 "installation-source": "dist", -
perfectdashboard/trunk/lib/src/vendor/paragonie/sodium_compat/README.md
r1946575 r2009749 29 29 such as [Joomla!](https://github.com/joomla/joomla-cms/blob/459d74686d2a638ec51149d7c44ddab8075852be/composer.json#L40) 30 30 and [Magento](https://github.com/magento/magento2/blob/8fd89cfdf52c561ac0ca7bc20fd38ef688e201b0/composer.json#L44). 31 Furthermore, sodium_compat was developed by Paragon Initiative Enterprises, a 32 company that *specializes* in secure PHP development and PHP cryptography, and 33 has been informally reviewed by many other security experts who also specialize 34 in PHP. 31 35 32 36 If you'd like to learn more about the defensive security measures we've taken … … 93 97 software for free, but will strive to fix any bugs (security-related or otherwise) in our library. 94 98 99 ## Support Contracts 100 101 If your company uses this library in their products or services, you may be 102 interested in [purchasing a support contract from Paragon Initiative Enterprises](https://paragonie.com/enterprise). 103 95 104 # Using Sodium Compat 96 105 … … 193 202 without harming the security of your cryptography keys. If your processor *isn't* safe, then decide whether you 194 203 want speed or security because you can't have both. 204 205 ### How can I tell if sodium_compat will be slow, at runtime? 206 207 Since version 1.8, you can use the `polyfill_is_fast()` static method to 208 determine if sodium_compat will be slow at runtime. 209 210 ```php 211 <?php 212 if (ParagonIE_Sodium_Compat::polyfill_is_fast()) { 213 // Use libsodium now 214 $process->execute(); 215 } else { 216 // Defer to a cron job or other sort of asynchronous process 217 $process->enqueue(); 218 } 219 ``` 195 220 196 221 ### Help, my PHP only has 32-Bit Integers! It's super slow! -
perfectdashboard/trunk/lib/src/vendor/paragonie/sodium_compat/appveyor.yml
r1853488 r2009749 5 5 - x64 6 6 clone_folder: C:\projects\sodium_compat 7 image: Visual Studio 2017 7 8 8 9 install: -
perfectdashboard/trunk/lib/src/vendor/paragonie/sodium_compat/lib/php72compat.php
r1853488 r2009749 64 64 'CRYPTO_STREAM_KEYBYTES', 65 65 'CRYPTO_STREAM_NONCEBYTES', 66 'LIBRARY_VERSION_MAJOR', 67 'LIBRARY_VERSION_MINOR', 68 'VERSION_STRING' 66 69 ) as $constant 67 70 ) { … … 427 430 * @param string $kp 428 431 * @return string|bool 432 * @throws SodiumException 429 433 */ 430 434 function sodium_crypto_box_seal_open($message, $kp) … … 432 436 try { 433 437 return ParagonIE_Sodium_Compat::crypto_box_seal_open($message, $kp); 434 } catch (Error $ex) { 435 return false; 436 } catch (Exception $ex) { 438 } catch (SodiumException $ex) { 439 if ($ex->getMessage() === 'Argument 2 must be CRYPTO_BOX_KEYPAIRBYTES long.') { 440 throw $ex; 441 } 437 442 return false; 438 443 } -
perfectdashboard/trunk/lib/src/vendor/paragonie/sodium_compat/src/Compat.php
r1946575 r2009749 2641 2641 2642 2642 /** 2643 * Will sodium_compat run fast on the current hardware and PHP configuration? 2644 * 2645 * @return bool 2646 */ 2647 public static function polyfill_is_fast() 2648 { 2649 if (extension_loaded('sodium')) { 2650 return true; 2651 } 2652 if (extension_loaded('libsodium')) { 2653 return true; 2654 } 2655 return PHP_INT_SIZE === 8; 2656 } 2657 2658 /** 2643 2659 * Generate a string of bytes from the kernel's CSPRNG. 2644 2660 * Proudly uses /dev/urandom (if getrandom(2) is not available). -
perfectdashboard/trunk/lib/src/vendor/paragonie/sodium_compat/src/Core32/Curve25519.php
r1946575 r2009749 508 508 /** @var ParagonIE_Sodium_Core32_Int64 $f9_2 */ 509 509 $f9_2 = $f9->shiftLeft(1); 510 $f0g0 = $f0->mulInt64($g0, 30);511 $f0g1 = $f0->mulInt64($g1, 2 9);512 $f0g2 = $f0->mulInt64($g2, 30);513 $f0g3 = $f0->mulInt64($g3, 2 9);514 $f0g4 = $f0->mulInt64($g4, 30);515 $f0g5 = $f0->mulInt64($g5, 2 9);516 $f0g6 = $f0->mulInt64($g6, 30);517 $f0g7 = $f0->mulInt64($g7, 2 9);518 $f0g8 = $f0->mulInt64($g8, 30);519 $f0g9 = $f0->mulInt64($g9, 30);520 $f1g0 = $f1->mulInt64($g0, 30);521 $f1g1_2 = $f1_2->mulInt64($g1, 30);522 $f1g2 = $f1->mulInt64($g2, 30);523 $f1g3_2 = $f1_2->mulInt64($g3, 30);510 $f0g0 = $f0->mulInt64($g0, 27); 511 $f0g1 = $f0->mulInt64($g1, 27); 512 $f0g2 = $f0->mulInt64($g2, 27); 513 $f0g3 = $f0->mulInt64($g3, 27); 514 $f0g4 = $f0->mulInt64($g4, 27); 515 $f0g5 = $f0->mulInt64($g5, 27); 516 $f0g6 = $f0->mulInt64($g6, 27); 517 $f0g7 = $f0->mulInt64($g7, 27); 518 $f0g8 = $f0->mulInt64($g8, 27); 519 $f0g9 = $f0->mulInt64($g9, 27); 520 $f1g0 = $f1->mulInt64($g0, 27); 521 $f1g1_2 = $f1_2->mulInt64($g1, 27); 522 $f1g2 = $f1->mulInt64($g2, 27); 523 $f1g3_2 = $f1_2->mulInt64($g3, 27); 524 524 $f1g4 = $f1->mulInt64($g4, 30); 525 525 $f1g5_2 = $f1_2->mulInt64($g5, 30); … … 812 812 $f9_38 = $f9->mulInt(38, 6); 813 813 /** @var ParagonIE_Sodium_Core32_Int64 $f0f0*/ 814 $f0f0 = $f0->mulInt64($f0, 2 9);815 $f0f1_2 = $f0_2->mulInt64($f1, 2 9);816 $f0f2_2 = $f0_2->mulInt64($f2, 2 9);817 $f0f3_2 = $f0_2->mulInt64($f3, 2 9);818 $f0f4_2 = $f0_2->mulInt64($f4, 2 9);819 $f0f5_2 = $f0_2->mulInt64($f5, 2 9);820 $f0f6_2 = $f0_2->mulInt64($f6, 2 9);821 $f0f7_2 = $f0_2->mulInt64($f7, 2 9);822 $f0f8_2 = $f0_2->mulInt64($f8, 2 9);823 $f0f9_2 = $f0_2->mulInt64($f9, 2 9);824 825 $f1f1_2 = $f1_2->mulInt64($f1, 2 9);826 $f1f2_2 = $f1_2->mulInt64($f2, 2 9);827 $f1f3_4 = $f1_2->mulInt64($f3_2, 2 9);828 $f1f4_2 = $f1_2->mulInt64($f4, 2 9);814 $f0f0 = $f0->mulInt64($f0, 28); 815 $f0f1_2 = $f0_2->mulInt64($f1, 28); 816 $f0f2_2 = $f0_2->mulInt64($f2, 28); 817 $f0f3_2 = $f0_2->mulInt64($f3, 28); 818 $f0f4_2 = $f0_2->mulInt64($f4, 28); 819 $f0f5_2 = $f0_2->mulInt64($f5, 28); 820 $f0f6_2 = $f0_2->mulInt64($f6, 28); 821 $f0f7_2 = $f0_2->mulInt64($f7, 28); 822 $f0f8_2 = $f0_2->mulInt64($f8, 28); 823 $f0f9_2 = $f0_2->mulInt64($f9, 28); 824 825 $f1f1_2 = $f1_2->mulInt64($f1, 28); 826 $f1f2_2 = $f1_2->mulInt64($f2, 28); 827 $f1f3_4 = $f1_2->mulInt64($f3_2, 28); 828 $f1f4_2 = $f1_2->mulInt64($f4, 28); 829 829 $f1f5_4 = $f1_2->mulInt64($f5_2, 30); 830 $f1f6_2 = $f1_2->mulInt64($f6, 2 9);831 $f1f7_4 = $f1_2->mulInt64($f7_2, 2 9);832 $f1f8_2 = $f1_2->mulInt64($f8, 2 9);830 $f1f6_2 = $f1_2->mulInt64($f6, 28); 831 $f1f7_4 = $f1_2->mulInt64($f7_2, 28); 832 $f1f8_2 = $f1_2->mulInt64($f8, 28); 833 833 $f1f9_76 = $f9_38->mulInt64($f1_2, 30); 834 834 835 $f2f2 = $f2->mulInt64($f2, 2 9);836 $f2f3_2 = $f2_2->mulInt64($f3, 2 9);837 $f2f4_2 = $f2_2->mulInt64($f4, 2 9);838 $f2f5_2 = $f2_2->mulInt64($f5, 2 9);839 $f2f6_2 = $f2_2->mulInt64($f6, 2 9);840 $f2f7_2 = $f2_2->mulInt64($f7, 2 9);835 $f2f2 = $f2->mulInt64($f2, 28); 836 $f2f3_2 = $f2_2->mulInt64($f3, 28); 837 $f2f4_2 = $f2_2->mulInt64($f4, 28); 838 $f2f5_2 = $f2_2->mulInt64($f5, 28); 839 $f2f6_2 = $f2_2->mulInt64($f6, 28); 840 $f2f7_2 = $f2_2->mulInt64($f7, 28); 841 841 $f2f8_38 = $f8_19->mulInt64($f2_2, 30); 842 842 $f2f9_38 = $f9_38->mulInt64($f2, 30); 843 843 844 $f3f3_2 = $f3_2->mulInt64($f3, 2 9);845 $f3f4_2 = $f3_2->mulInt64($f4, 2 9);844 $f3f3_2 = $f3_2->mulInt64($f3, 28); 845 $f3f4_2 = $f3_2->mulInt64($f4, 28); 846 846 $f3f5_4 = $f3_2->mulInt64($f5_2, 30); 847 $f3f6_2 = $f3_2->mulInt64($f6, 2 9);847 $f3f6_2 = $f3_2->mulInt64($f6, 28); 848 848 $f3f7_76 = $f7_38->mulInt64($f3_2, 30); 849 849 $f3f8_38 = $f8_19->mulInt64($f3_2, 30); 850 850 $f3f9_76 = $f9_38->mulInt64($f3_2, 30); 851 851 852 $f4f4 = $f4->mulInt64($f4, 2 9);853 $f4f5_2 = $f4_2->mulInt64($f5, 2 9);852 $f4f4 = $f4->mulInt64($f4, 28); 853 $f4f5_2 = $f4_2->mulInt64($f5, 28); 854 854 $f4f6_38 = $f6_19->mulInt64($f4_2, 30); 855 855 $f4f7_38 = $f7_38->mulInt64($f4, 30); … … 868 868 $f6f9_38 = $f9_38->mulInt64($f6, 30); 869 869 870 $f7f7_38 = $f7_38->mulInt64($f7, 2 9);870 $f7f7_38 = $f7_38->mulInt64($f7, 28); 871 871 $f7f8_38 = $f8_19->mulInt64($f7_2, 30); 872 872 $f7f9_76 = $f9_38->mulInt64($f7_2, 30); … … 875 875 $f8f9_38 = $f9_38->mulInt64($f8, 30); 876 876 877 $f9f9_38 = $f9_38->mulInt64($f9, 2 9);877 $f9f9_38 = $f9_38->mulInt64($f9, 28); 878 878 879 879 $h0 = $f0f0->addInt64($f1f9_76)->addInt64($f2f8_38)->addInt64($f3f7_76)->addInt64($f4f6_38)->addInt64($f5f5_38); … … 1032 1032 $f1f7_4 = $f1_2->mulInt64($f7_2, 29); 1033 1033 $f1f8_2 = $f1_2->mulInt64($f8, 28); 1034 $f1f9_76 = $f9_38->mulInt64($f1_2, 30);1034 $f1f9_76 = $f9_38->mulInt64($f1_2, 29); 1035 1035 $f2f2 = $f2->mulInt64($f2, 28); 1036 1036 $f2f3_2 = $f2_2->mulInt64($f3, 28); … … 1039 1039 $f2f6_2 = $f2_2->mulInt64($f6, 28); 1040 1040 $f2f7_2 = $f2_2->mulInt64($f7, 28); 1041 $f2f8_38 = $f8_19->mulInt64($f2_2, 30);1042 $f2f9_38 = $f9_38->mulInt64($f2, 30);1041 $f2f8_38 = $f8_19->mulInt64($f2_2, 29); 1042 $f2f9_38 = $f9_38->mulInt64($f2, 29); 1043 1043 $f3f3_2 = $f3_2->mulInt64($f3, 28); 1044 1044 $f3f4_2 = $f3_2->mulInt64($f4, 28); 1045 1045 $f3f5_4 = $f3_2->mulInt64($f5_2, 28); 1046 1046 $f3f6_2 = $f3_2->mulInt64($f6, 28); 1047 $f3f7_76 = $f7_38->mulInt64($f3_2, 30);1048 $f3f8_38 = $f8_19->mulInt64($f3_2, 30);1049 $f3f9_76 = $f9_38->mulInt64($f3_2, 30);1047 $f3f7_76 = $f7_38->mulInt64($f3_2, 29); 1048 $f3f8_38 = $f8_19->mulInt64($f3_2, 29); 1049 $f3f9_76 = $f9_38->mulInt64($f3_2, 29); 1050 1050 $f4f4 = $f4->mulInt64($f4, 28); 1051 1051 $f4f5_2 = $f4_2->mulInt64($f5, 28); 1052 $f4f6_38 = $f6_19->mulInt64($f4_2, 30);1053 $f4f7_38 = $f7_38->mulInt64($f4, 30);1054 $f4f8_38 = $f8_19->mulInt64($f4_2, 30);1055 $f4f9_38 = $f9_38->mulInt64($f4, 30);1056 $f5f5_38 = $f5_38->mulInt64($f5, 30);1057 $f5f6_38 = $f6_19->mulInt64($f5_2, 30);1058 $f5f7_76 = $f7_38->mulInt64($f5_2, 30);1059 $f5f8_38 = $f8_19->mulInt64($f5_2, 30);1060 $f5f9_76 = $f9_38->mulInt64($f5_2, 30);1061 $f6f6_19 = $f6_19->mulInt64($f6, 30);1062 $f6f7_38 = $f7_38->mulInt64($f6, 30);1063 $f6f8_38 = $f8_19->mulInt64($f6_2, 30);1064 $f6f9_38 = $f9_38->mulInt64($f6, 30);1065 $f7f7_38 = $f7_38->mulInt64($f7, 30);1066 $f7f8_38 = $f8_19->mulInt64($f7_2, 30);1067 $f7f9_76 = $f9_38->mulInt64($f7_2, 30);1068 $f8f8_19 = $f8_19->mulInt64($f8, 30);1069 $f8f9_38 = $f9_38->mulInt64($f8, 30);1070 $f9f9_38 = $f9_38->mulInt64($f9, 30);1052 $f4f6_38 = $f6_19->mulInt64($f4_2, 29); 1053 $f4f7_38 = $f7_38->mulInt64($f4, 29); 1054 $f4f8_38 = $f8_19->mulInt64($f4_2, 29); 1055 $f4f9_38 = $f9_38->mulInt64($f4, 29); 1056 $f5f5_38 = $f5_38->mulInt64($f5, 29); 1057 $f5f6_38 = $f6_19->mulInt64($f5_2, 29); 1058 $f5f7_76 = $f7_38->mulInt64($f5_2, 29); 1059 $f5f8_38 = $f8_19->mulInt64($f5_2, 29); 1060 $f5f9_76 = $f9_38->mulInt64($f5_2, 29); 1061 $f6f6_19 = $f6_19->mulInt64($f6, 29); 1062 $f6f7_38 = $f7_38->mulInt64($f6, 29); 1063 $f6f8_38 = $f8_19->mulInt64($f6_2, 29); 1064 $f6f9_38 = $f9_38->mulInt64($f6, 29); 1065 $f7f7_38 = $f7_38->mulInt64($f7, 29); 1066 $f7f8_38 = $f8_19->mulInt64($f7_2, 29); 1067 $f7f9_76 = $f9_38->mulInt64($f7_2, 29); 1068 $f8f8_19 = $f8_19->mulInt64($f8, 29); 1069 $f8f9_38 = $f9_38->mulInt64($f8, 29); 1070 $f9f9_38 = $f9_38->mulInt64($f9, 29); 1071 1071 1072 1072 $h0 = $f0f0->addInt64($f1f9_76)->addInt64($f2f8_38)->addInt64($f3f7_76)->addInt64($f4f6_38)->addInt64($f5f5_38); -
perfectdashboard/trunk/perfectdashboard.php
r1974720 r2009749 4 4 * Plugin URI: https://perfectdashboard.com/?utm_source=backend&utm_medium=installer&utm_campaign=in&utm_term=WP 5 5 * Description: 6 * Version: 1.2 0.26 * Version: 1.23.0 7 7 * Text Domain: autoupdater 8 8 * Author: Perfect Dashboard … … 48 48 function AutoUpdater_getRootPath() 49 49 { 50 if ( isset($_SERVER['SCRIPT_FILENAME']))50 if (!empty($_SERVER['SCRIPT_FILENAME'])) 51 51 { 52 $path = dirname( $_SERVER['SCRIPT_FILENAME']) . '/';53 if ( basename($path) == 'wp-admin')52 $path = dirname(realpath($_SERVER['SCRIPT_FILENAME'])) . '/'; 53 if (defined('CMSDETECTOR')) 54 54 { 55 $path = dirname($path) . '/'; 55 // Core files in subdirectory 56 if (!file_exists($path . 'index.php') && file_exists($path . '../index.php')) 57 { 58 return dirname($path) . '/'; 59 } 56 60 } 61 elseif (basename($path) == 'wp-admin') 62 { 63 return dirname($path) . '/'; 64 } 65 57 66 return $path; 58 67 } … … 61 70 if (isset($files[0]) && substr($files[0], -9) == 'index.php') 62 71 { 63 return dirname( $files[0]) . '/';72 return dirname(realpath($files[0])) . '/'; 64 73 } 65 74 -
perfectdashboard/trunk/readme.txt
r1990594 r2009749 4 4 Tags: manage multiple sites, manage wordpress, backup, security, malware 5 5 Requires at least: 3.0 6 Tested up to: 5.0 7 Stable tag: 1.2 0.26 Tested up to: 5.0.3 7 Stable tag: 1.23.0 8 8 License: GNU/GPL 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html -
perfectdashboard/trunk/tmpl/configuration_form_advanced_fields.tmpl.php
r1962848 r2009749 9 9 <td> 10 10 <input id="autoupdater_read_token" name="read_token" type="text" class="regular-text" 11 value="<?php echo $read_token; ?>"<?php if ($protect || $expires_at) echo ' disabled="disabled"'; ?>11 value="<?php echo $read_token; ?>"<?php if ($protect) echo ' disabled="disabled"'; ?> 12 12 /> 13 13 <p class="description"> … … 24 24 <td> 25 25 <input id="autoupdater_write_token" name="write_token" type="text" class="regular-text" 26 value="<?php echo $write_token; ?>"<?php if ($protect || $expires_at) echo ' disabled="disabled"'; ?>26 value="<?php echo $write_token; ?>"<?php if ($protect) echo ' disabled="disabled"'; ?> 27 27 /> 28 <?php if ($expires_at) echo '<p>' . sprintf(__('Expires at %s', 'autoupdater'), $expires_at) . '</p>'; ?>29 28 <p class="description"> 30 29 <?php _e('This token is used during making modifications to the website', 'autoupdater') ?>
Note: See TracChangeset
for help on using the changeset viewer.