Changeset 3369397
- Timestamp:
- 09/29/2025 03:46:49 AM (3 months ago)
- Location:
- obs-huaweicloud
- Files:
-
- 2 added
- 58 edited
- 1 copied
-
tags/1.4.2 (copied) (copied from obs-huaweicloud/trunk)
-
tags/1.4.2/huaweicloud-obs-wordpress.php (modified) (19 diffs)
-
tags/1.4.2/sdk/vendor/autoload.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/composer/InstalledVersions.php (modified) (4 diffs)
-
tags/1.4.2/sdk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/composer/autoload_static.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/composer/installed.json (modified) (9 diffs)
-
tags/1.4.2/sdk/vendor/composer/installed.php (modified) (5 diffs)
-
tags/1.4.2/sdk/vendor/composer/platform_check.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/CHANGELOG.md (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/composer.json (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/package-lock.json (added)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php (modified) (2 diffs)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php (modified) (2 diffs)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php (modified) (2 diffs)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Middleware.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Pool.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Utils.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/functions.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/promises/CHANGELOG.md (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/promises/README.md (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/promises/composer.json (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/psr7/CHANGELOG.md (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/psr7/README.md (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/psr7/composer.json (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/psr7/src/MessageTrait.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/psr7/src/UploadedFile.php (modified) (3 diffs)
-
tags/1.4.2/sdk/vendor/guzzlehttp/psr7/src/Uri.php (modified) (1 diff)
-
tags/1.4.2/sdk/vendor/guzzlehttp/psr7/src/Utils.php (modified) (2 diffs)
-
trunk/huaweicloud-obs-wordpress.php (modified) (19 diffs)
-
trunk/sdk/vendor/autoload.php (modified) (1 diff)
-
trunk/sdk/vendor/composer/InstalledVersions.php (modified) (4 diffs)
-
trunk/sdk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
trunk/sdk/vendor/composer/autoload_static.php (modified) (1 diff)
-
trunk/sdk/vendor/composer/installed.json (modified) (9 diffs)
-
trunk/sdk/vendor/composer/installed.php (modified) (5 diffs)
-
trunk/sdk/vendor/composer/platform_check.php (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/guzzle/CHANGELOG.md (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/guzzle/composer.json (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/guzzle/package-lock.json (added)
-
trunk/sdk/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php (modified) (2 diffs)
-
trunk/sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php (modified) (2 diffs)
-
trunk/sdk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php (modified) (2 diffs)
-
trunk/sdk/vendor/guzzlehttp/guzzle/src/Middleware.php (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/guzzle/src/Pool.php (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/guzzle/src/Utils.php (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/guzzle/src/functions.php (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/promises/CHANGELOG.md (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/promises/README.md (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/promises/composer.json (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/psr7/CHANGELOG.md (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/psr7/README.md (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/psr7/composer.json (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/psr7/src/MessageTrait.php (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/psr7/src/UploadedFile.php (modified) (3 diffs)
-
trunk/sdk/vendor/guzzlehttp/psr7/src/Uri.php (modified) (1 diff)
-
trunk/sdk/vendor/guzzlehttp/psr7/src/Utils.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
obs-huaweicloud/tags/1.4.2/huaweicloud-obs-wordpress.php
r3214598 r3369397 4 4 Plugin URI: https://github.com/sy-records/huaweicloud-obs-wordpress 5 5 Description: 使用华为云对象存储服务 OBS 作为附件存储空间。(This is a plugin that uses HuaWei Cloud Object Storage Service for attachments remote saving.) 6 Version: 1.4. 16 Version: 1.4.2 7 7 Author: 沈唁 8 8 Author URI: https://qq52o.me … … 15 15 use Obs\ObsException; 16 16 17 define('OBS_VERSION', '1.4. 1');17 define('OBS_VERSION', '1.4.2'); 18 18 define('OBS_BASEFOLDER', plugin_basename(dirname(__FILE__))); 19 19 … … 136 136 $bucket = obs_get_bucket_name(); 137 137 $obsClient = obs_get_client(); 138 $obsClient->deleteObject( array('Bucket' => $bucket, 'Key' => $file));138 $obsClient->deleteObject(['Bucket' => $bucket, 'Key' => $file]); 139 139 } 140 140 … … 153 153 $bucket = obs_get_bucket_name(); 154 154 $obsClient = obs_get_client(); 155 $obsClient->deleteObjects( array('Bucket' => $bucket, 'Objects' => $deleteObjects, 'Quiet' => false));155 $obsClient->deleteObjects(['Bucket' => $bucket, 'Objects' => $deleteObjects, 'Quiet' => false]); 156 156 } 157 157 … … 308 308 309 309 // 当upload_path为根目录时,需要移除URL中出现的“绝对路径” 310 function obs_mod efiy_img_url($url, $post_id)310 function obs_modify_img_url($url, $post_id) 311 311 { 312 312 // 移除 ./ 和 项目根路径 313 $url = str_replace(['./', get_home_path()], '', $url); 314 return $url; 313 return str_replace(['./', get_home_path()], '', $url); 315 314 } 316 315 317 316 if (get_option('upload_path') == '.') { 318 add_filter('wp_get_attachment_url', 'obs_mod efiy_img_url', 30, 2);317 add_filter('wp_get_attachment_url', 'obs_modify_img_url', 30, 2); 319 318 } 320 319 … … 332 331 } 333 332 add_filter('sanitize_file_name', 'obs_sanitize_file_name', 10, 1); 334 335 function obs_function_each(&$array)336 {337 $res = [];338 $key = key($array);339 if ($key !== null) {340 next($array);341 $res[1] = $res['value'] = $array[$key];342 $res[0] = $res['key'] = $key;343 } else {344 $res = false;345 }346 return $res;347 }348 333 349 334 /** … … 439 424 wp_die('Insufficient privileges!'); 440 425 } 426 if (!empty($_POST) && !empty($_POST['type'])) { 427 $nonce = $_POST["{$_POST['type']}-nonce"] ?? ''; 428 if (empty($nonce) || !wp_verify_nonce($nonce, $_POST['type'])) { 429 wp_die('Illegal requests!'); 430 } 431 } 441 432 $options = []; 442 if (!empty($_POST) && $_POST['type'] == ' obs_set') {433 if (!empty($_POST) && $_POST['type'] == 'huaweicloud_obs_set') { 443 434 $options['bucket'] = isset($_POST['bucket']) ? sanitize_text_field($_POST['bucket']) : ''; 444 435 $options['regional'] = isset($_POST['regional']) ? sanitize_text_field($_POST['regional']) : ''; … … 447 438 $options['nothumb'] = isset($_POST['nothumb']) ? 'true' : 'false'; 448 439 $options['nolocalsaving'] = isset($_POST['nolocalsaving']) ? 'true' : 'false'; 449 //仅用于插件卸载时比较使用450 440 $options['upload_url_path'] = isset($_POST['upload_url_path']) ? sanitize_text_field(stripslashes($_POST['upload_url_path'])) : ''; 451 441 $options['update_file_name'] = isset($_POST['update_file_name']) ? sanitize_text_field($_POST['update_file_name']) : 'false'; … … 465 455 $new_url = esc_url_raw($_POST['new_url']); 466 456 467 if (!empty($old_url) && !empty($new_url)) {457 if (!empty($old_url)) { 468 458 global $wpdb; 469 459 // 文章内容 … … 511 501 512 502 $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://'; 513 ?>503 ?> 514 504 <div class="wrap" style="margin: 10px;"> 515 505 <h1>华为云 OBS 设置 <span style="font-size: 13px;">当前版本:<?php echo OBS_VERSION; ?></span></h1> 516 506 <p>如果觉得此插件对你有所帮助,不妨到 <a href="https://github.com/sy-records/huaweicloud-obs-wordpress" target="_blank">GitHub</a> 上点个<code>Star</code>,<code>Watch</code>关注更新;<a href="https://go.qq52o.me/qm/ccs" target="_blank">欢迎加入云存储插件交流群,QQ群号:887595381</a>;</p> 517 507 <hr/> 518 <form name="form1" method="post" action="<?php echo wp_nonce_url('./options-general.php?page=' . OBS_BASEFOLDER . '/huaweicloud-obs-wordpress.php'); ?>">508 <form method="post"> 519 509 <table class="form-table"> 520 510 <tr> … … 523 513 </th> 524 514 <td> 525 <input type="text" name="bucket" value="<?php echo $obs_bucket; ?>" size="50" placeholder="请填写桶名称"/>515 <input type="text" name="bucket" required value="<?php echo $obs_bucket; ?>" size="50" placeholder="请填写桶名称"/> 526 516 527 517 <p>请先访问 <a href="https://storage.huaweicloud.com/obs/?region=cn-east-3#/obs/create" target="_blank">华为云控制台</a> 创建<code>桶</code>,再填写以上内容。</p> … … 541 531 <legend>key</legend> 542 532 </th> 543 <td><input type="text" name="key" value="<?php echo $obs_key; ?>" size="50" placeholder="key"/></td>533 <td><input type="text" name="key" required value="<?php echo $obs_key; ?>" size="50" placeholder="key"/></td> 544 534 </tr> 545 535 <tr> … … 548 538 </th> 549 539 <td> 550 <input type="text" name="secret" value="<?php echo $obs_secret; ?>" size="50" placeholder="secret"/>540 <input type="text" name="secret" required value="<?php echo $obs_secret; ?>" size="50" placeholder="secret"/> 551 541 </td> 552 542 </tr> … … 586 576 </th> 587 577 <td> 588 <input type="text" name="upload_path" value="<?php echo $upload_path; ?>" size="50" placeholder="请输入上传文件夹"/>578 <input type="text" name="upload_path" required value="<?php echo $upload_path; ?>" size="50" placeholder="请输入上传文件夹"/> 589 579 <p>附件在服务器上的存储位置,例如: <code>wp-content/uploads</code> (注意不要以“/”开头和结尾),根目录请输入<code>.</code>。</p> 590 580 </td> … … 595 585 </th> 596 586 <td> 597 <input type="text" name="upload_url_path" value="<?php echo $upload_url_path; ?>" size="50" placeholder="请输入URL前缀"/>587 <input type="text" name="upload_url_path" required value="<?php echo $upload_url_path; ?>" size="50" placeholder="请输入URL前缀"/> 598 588 599 589 <p><b>注意:</b></p> … … 608 598 <tr> 609 599 <th><legend>保存/更新选项</legend></th> 610 <td><input type="submit" name="submit"class="button button-primary" value="保存更改"/></td>600 <td><input type="submit" class="button button-primary" value="保存更改"/></td> 611 601 </tr> 612 602 </table> 613 <input type="hidden" name="type" value="obs_set"> 603 <input type="hidden" name="type" value="huaweicloud_obs_set"> 604 <?php wp_nonce_field('huaweicloud_obs_set', 'huaweicloud_obs_set-nonce'); ?> 614 605 </form> 615 <form name="form2" method="post" action="<?php echo wp_nonce_url('./options-general.php?page=' . OBS_BASEFOLDER . '/huaweicloud-obs-wordpress.php'); ?>">606 <form method="post"> 616 607 <table class="form-table"> 617 608 <tr> … … 620 611 </th> 621 612 <input type="hidden" name="type" value="huaweicloud_obs_all"> 622 <td> 623 <input type="submit" name="submit" class="button button-secondary" value="开始同步"/> 613 <?php wp_nonce_field('huaweicloud_obs_all', 'huaweicloud_obs_all-nonce'); ?> 614 <td> 615 <input type="submit" class="button button-secondary" value="开始同步"/> 624 616 <p><b>注意:如果是首次同步,执行时间将会十分十分长(根据你的历史附件数量),有可能会因执行时间过长,页面显示超时或者报错。<br> 所以,建议那些几千上万附件的大神们,考虑官方的 <a target="_blank" rel="nofollow" href="https://support.huaweicloud.com/utiltg-obs/obs_11_0001.html">同步工具</a></b></p> 625 617 </td> … … 628 620 </form> 629 621 <hr> 630 <form name="form3" method="post" action="<?php echo wp_nonce_url('./options-general.php?page=' . OBS_BASEFOLDER . '/huaweicloud-obs-wordpress.php'); ?>">622 <form method="post"> 631 623 <table class="form-table"> 632 624 <tr> … … 651 643 </th> 652 644 <input type="hidden" name="type" value="huaweicloud_obs_replace"> 653 <td> 654 <input type="submit" name="submit" class="button button-secondary" value="开始替换"/> 645 <?php wp_nonce_field('huaweicloud_obs_replace', 'huaweicloud_obs_replace-nonce'); ?> 646 <td> 647 <input type="submit" class="button button-secondary" value="开始替换"/> 655 648 <p><b>注意:如果是首次替换,请注意备份!此功能会替换文章以及设置的特色图片(题图)等使用的资源链接</b></p> 656 649 </td> -
obs-huaweicloud/tags/1.4.2/sdk/vendor/autoload.php
r3201267 r3369397 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 -
obs-huaweicloud/tags/1.4.2/sdk/vendor/composer/InstalledVersions.php
r3214598 r3369397 28 28 { 29 29 /** 30 * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to 31 * @internal 32 */ 33 private static $selfDir = null; 34 35 /** 30 36 * @var mixed[]|null 31 37 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 38 */ 33 39 private static $installed; 40 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 34 45 35 46 /** … … 310 321 self::$installed = $data; 311 322 self::$installedByVendor = array(); 323 324 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 325 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 326 // so we have to assume it does not, and that may result in duplicate data being returned when listing 327 // all installed packages for example 328 self::$installedIsLocalDir = false; 329 } 330 331 /** 332 * @return string 333 */ 334 private static function getSelfDir() 335 { 336 if (self::$selfDir === null) { 337 self::$selfDir = strtr(__DIR__, '\\', '/'); 338 } 339 340 return self::$selfDir; 312 341 } 313 342 … … 326 355 327 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 328 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 329 360 if (isset(self::$installedByVendor[$vendorDir])) { 330 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 334 365 self::$installedByVendor[$vendorDir] = $required; 335 366 $installed[] = $required; 336 if (s trtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {367 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 337 368 self::$installed = $required; 338 $copiedLocalDir = true;369 self::$installedIsLocalDir = true; 339 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 340 374 } 341 375 } -
obs-huaweicloud/tags/1.4.2/sdk/vendor/composer/autoload_psr4.php
r3214598 r3369397 8 8 return array( 9 9 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 10 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http- message/src', $vendorDir . '/psr/http-factory/src'),10 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 11 11 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 12 12 'Obs\\' => array($vendorDir . '/obs/esdk-obs-php/Obs'), -
obs-huaweicloud/tags/1.4.2/sdk/vendor/composer/autoload_static.php
r3214598 r3369397 43 43 'Psr\\Http\\Message\\' => 44 44 array ( 45 0 => __DIR__ . '/..' . '/psr/http- message/src',46 1 => __DIR__ . '/..' . '/psr/http- factory/src',45 0 => __DIR__ . '/..' . '/psr/http-factory/src', 46 1 => __DIR__ . '/..' . '/psr/http-message/src', 47 47 ), 48 48 'Psr\\Http\\Client\\' => -
obs-huaweicloud/tags/1.4.2/sdk/vendor/composer/installed.json
r3214598 r3369397 3 3 { 4 4 "name": "guzzlehttp/guzzle", 5 "version": "7. 9.2",6 "version_normalized": "7. 9.2.0",5 "version": "7.10.0", 6 "version_normalized": "7.10.0.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/guzzle/guzzle.git", 10 "reference": " d281ed313b989f213357e3be1a179f02196ac99b"11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ d281ed313b989f213357e3be1a179f02196ac99b",15 "reference": " d281ed313b989f213357e3be1a179f02196ac99b",10 "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4" 11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", 15 "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", 16 16 "shasum": "" 17 17 }, 18 18 "require": { 19 19 "ext-json": "*", 20 "guzzlehttp/promises": "^ 1.5.3 || ^2.0.3",21 "guzzlehttp/psr7": "^2. 7.0",20 "guzzlehttp/promises": "^2.3", 21 "guzzlehttp/psr7": "^2.8", 22 22 "php": "^7.2.5 || ^8.0", 23 23 "psr/http-client": "^1.0", … … 40 40 "psr/log": "Required for using the Log middleware" 41 41 }, 42 "time": "202 4-07-24T11:22:20+00:00",42 "time": "2025-08-23T22:36:01+00:00", 43 43 "type": "library", 44 44 "extra": { … … 112 112 "support": { 113 113 "issues": "https://github.com/guzzle/guzzle/issues", 114 "source": "https://github.com/guzzle/guzzle/tree/7. 9.2"114 "source": "https://github.com/guzzle/guzzle/tree/7.10.0" 115 115 }, 116 116 "funding": [ … … 132 132 { 133 133 "name": "guzzlehttp/promises", 134 "version": "2. 0.4",135 "version_normalized": "2. 0.4.0",134 "version": "2.3.0", 135 "version_normalized": "2.3.0.0", 136 136 "source": { 137 137 "type": "git", 138 138 "url": "https://github.com/guzzle/promises.git", 139 "reference": " f9c436286ab2892c7db7be8c8da4ef61ccf7b455"140 }, 141 "dist": { 142 "type": "zip", 143 "url": "https://api.github.com/repos/guzzle/promises/zipball/ f9c436286ab2892c7db7be8c8da4ef61ccf7b455",144 "reference": " f9c436286ab2892c7db7be8c8da4ef61ccf7b455",139 "reference": "481557b130ef3790cf82b713667b43030dc9c957" 140 }, 141 "dist": { 142 "type": "zip", 143 "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957", 144 "reference": "481557b130ef3790cf82b713667b43030dc9c957", 145 145 "shasum": "" 146 146 }, … … 150 150 "require-dev": { 151 151 "bamarni/composer-bin-plugin": "^1.8.2", 152 "phpunit/phpunit": "^8.5. 39 || ^9.6.20"153 }, 154 "time": "202 4-10-17T10:06:22+00:00",152 "phpunit/phpunit": "^8.5.44 || ^9.6.25" 153 }, 154 "time": "2025-08-22T14:34:08+00:00", 155 155 "type": "library", 156 156 "extra": { … … 198 198 "support": { 199 199 "issues": "https://github.com/guzzle/promises/issues", 200 "source": "https://github.com/guzzle/promises/tree/2. 0.4"200 "source": "https://github.com/guzzle/promises/tree/2.3.0" 201 201 }, 202 202 "funding": [ … … 218 218 { 219 219 "name": "guzzlehttp/psr7", 220 "version": "2. 7.0",221 "version_normalized": "2. 7.0.0",220 "version": "2.8.0", 221 "version_normalized": "2.8.0.0", 222 222 "source": { 223 223 "type": "git", 224 224 "url": "https://github.com/guzzle/psr7.git", 225 "reference": " a70f5c95fb43bc83f07c9c948baa0dc1829bf201"226 }, 227 "dist": { 228 "type": "zip", 229 "url": "https://api.github.com/repos/guzzle/psr7/zipball/ a70f5c95fb43bc83f07c9c948baa0dc1829bf201",230 "reference": " a70f5c95fb43bc83f07c9c948baa0dc1829bf201",225 "reference": "21dc724a0583619cd1652f673303492272778051" 226 }, 227 "dist": { 228 "type": "zip", 229 "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051", 230 "reference": "21dc724a0583619cd1652f673303492272778051", 231 231 "shasum": "" 232 232 }, … … 244 244 "bamarni/composer-bin-plugin": "^1.8.2", 245 245 "http-interop/http-factory-tests": "0.9.0", 246 "phpunit/phpunit": "^8.5. 39 || ^9.6.20"246 "phpunit/phpunit": "^8.5.44 || ^9.6.25" 247 247 }, 248 248 "suggest": { 249 249 "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" 250 250 }, 251 "time": "202 4-07-18T11:15:46+00:00",251 "time": "2025-08-23T21:21:41+00:00", 252 252 "type": "library", 253 253 "extra": { … … 317 317 "support": { 318 318 "issues": "https://github.com/guzzle/psr7/issues", 319 "source": "https://github.com/guzzle/psr7/tree/2. 7.0"319 "source": "https://github.com/guzzle/psr7/tree/2.8.0" 320 320 }, 321 321 "funding": [ -
obs-huaweicloud/tags/1.4.2/sdk/vendor/composer/installed.php
r3214598 r3369397 2 2 'root' => array( 3 3 'name' => '__root__', 4 'pretty_version' => 'v1.4. 1',5 'version' => '1.4. 1.0',6 'reference' => ' 7159428a1d70b2aded4ddfcc856abee3267e0a5c',4 'pretty_version' => 'v1.4.2', 5 'version' => '1.4.2.0', 6 'reference' => 'd0cfeb435a9113df0a92abf4b722675a6822835e', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 '__root__' => array( 14 'pretty_version' => 'v1.4. 1',15 'version' => '1.4. 1.0',16 'reference' => ' 7159428a1d70b2aded4ddfcc856abee3267e0a5c',14 'pretty_version' => 'v1.4.2', 15 'version' => '1.4.2.0', 16 'reference' => 'd0cfeb435a9113df0a92abf4b722675a6822835e', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', … … 21 21 ), 22 22 'guzzlehttp/guzzle' => array( 23 'pretty_version' => '7. 9.2',24 'version' => '7. 9.2.0',25 'reference' => ' d281ed313b989f213357e3be1a179f02196ac99b',23 'pretty_version' => '7.10.0', 24 'version' => '7.10.0.0', 25 'reference' => 'b51ac707cfa420b7bfd4e4d5e510ba8008e822b4', 26 26 'type' => 'library', 27 27 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', … … 30 30 ), 31 31 'guzzlehttp/promises' => array( 32 'pretty_version' => '2. 0.4',33 'version' => '2. 0.4.0',34 'reference' => ' f9c436286ab2892c7db7be8c8da4ef61ccf7b455',32 'pretty_version' => '2.3.0', 33 'version' => '2.3.0.0', 34 'reference' => '481557b130ef3790cf82b713667b43030dc9c957', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../guzzlehttp/promises', … … 39 39 ), 40 40 'guzzlehttp/psr7' => array( 41 'pretty_version' => '2. 7.0',42 'version' => '2. 7.0.0',43 'reference' => ' a70f5c95fb43bc83f07c9c948baa0dc1829bf201',41 'pretty_version' => '2.8.0', 42 'version' => '2.8.0.0', 43 'reference' => '21dc724a0583619cd1652f673303492272778051', 44 44 'type' => 'library', 45 45 'install_path' => __DIR__ . '/../guzzlehttp/psr7', -
obs-huaweicloud/tags/1.4.2/sdk/vendor/composer/platform_check.php
r3201267 r3369397 20 20 } 21 21 } 22 trigger_error( 23 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 E_USER_ERROR 22 throw new \RuntimeException( 23 'Composer detected issues in your platform: ' . implode(' ', $issues) 25 24 ); 26 25 } -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/CHANGELOG.md
r3201267 r3369397 2 2 3 3 Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version. 4 5 ## 7.10.0 - 2025-08-23 6 7 ### Added 8 9 - Support for PHP 8.5 10 11 ### Changed 12 13 - Adjusted `guzzlehttp/promises` version constraint to `^2.3` 14 - Adjusted `guzzlehttp/psr7` version constraint to `^2.8` 15 16 17 ## 7.9.3 - 2025-03-27 18 19 ### Changed 20 21 - Remove explicit content-length header for GET requests 22 - Improve compatibility with bad servers for boolean cookie values 4 23 5 24 -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/composer.json
r3201267 r3369397 82 82 "php": "^7.2.5 || ^8.0", 83 83 "ext-json": "*", 84 "guzzlehttp/promises": "^ 1.5.3 || ^2.0.3",85 "guzzlehttp/psr7": "^2. 7.0",84 "guzzlehttp/promises": "^2.3", 85 "guzzlehttp/psr7": "^2.8", 86 86 "psr/http-client": "^1.0", 87 87 "symfony/deprecation-contracts": "^2.2 || ^3.0" -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
r3201267 r3369397 63 63 $data[$search] = (int) $value; 64 64 } 65 } elseif ($search === 'Secure' || $search === 'Discard' || $search === 'HttpOnly') { 66 if ($value) { 67 $data[$search] = true; 68 } 65 69 } else { 66 70 $data[$search] = $value; -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
r3201267 r3369397 126 126 127 127 if (\count($this->handles) >= $this->maxHandles) { 128 \curl_close($resource); 128 if (PHP_VERSION_ID < 80000) { 129 \curl_close($resource); 130 } 129 131 } else { 130 132 // Remove all callback functions as they can hold onto references … … 730 732 { 731 733 foreach ($this->handles as $id => $handle) { 732 \curl_close($handle); 734 if (PHP_VERSION_ID < 80000) { 735 \curl_close($handle); 736 } 737 733 738 unset($this->handles[$id]); 734 739 } -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
r3201267 r3369397 241 241 unset($this->delays[$id], $this->handles[$id]); 242 242 \curl_multi_remove_handle($this->_mh, $handle); 243 \curl_close($handle); 243 244 if (PHP_VERSION_ID < 80000) { 245 \curl_close($handle); 246 } 244 247 245 248 return true; -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
r3201267 r3369397 18 18 * requests to another handler. 19 19 * 20 * @param callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses21 * @param callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync Handler used for synchronous responses.20 * @param callable(RequestInterface, array): PromiseInterface $default Handler used for normal responses 21 * @param callable(RequestInterface, array): PromiseInterface $sync Handler used for synchronous responses. 22 22 * 23 * @return callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.23 * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler. 24 24 */ 25 25 public static function wrapSync(callable $default, callable $sync): callable … … 38 38 * through the StreamHandler. 39 39 * 40 * @param callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for non-streaming responses41 * @param callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses40 * @param callable(RequestInterface, array): PromiseInterface $default Handler used for non-streaming responses 41 * @param callable(RequestInterface, array): PromiseInterface $streaming Handler used for streaming responses 42 42 * 43 * @return callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.43 * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler. 44 44 */ 45 45 public static function wrapStreaming(callable $default, callable $streaming): callable -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
r3201267 r3369397 54 54 55 55 // Append a content-length header if body size is zero to match 56 // cURL's behavior. 57 if (0 === $request->getBody()->getSize()) { 56 // the behavior of `CurlHandler` 57 if ( 58 ( 59 0 === \strcasecmp('PUT', $request->getMethod()) 60 || 0 === \strcasecmp('POST', $request->getMethod()) 61 ) 62 && 0 === $request->getBody()->getSize() 63 ) { 58 64 $request = $request->withHeader('Content-Length', '0'); 59 65 } … … 328 334 329 335 return $this->createResource( 330 function () use ($uri, &$http_response_header,$contextResource, $context, $options, $request) {336 function () use ($uri, $contextResource, $context, $options, $request) { 331 337 $resource = @\fopen((string) $uri, 'r', false, $contextResource); 338 339 // See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable 340 if (function_exists('http_get_last_response_headers')) { 341 /** @var array|null */ 342 $http_response_header = \http_get_last_response_headers(); 343 } 344 332 345 $this->lastHeaders = $http_response_header ?? []; 333 346 -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Middleware.php
r3201267 r3369397 188 188 * formatter. 189 189 * 190 * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.191 *192 190 * @param LoggerInterface $logger Logs messages. 193 191 * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings. 194 192 * @param string $logLevel Level at which to log requests. 193 * 194 * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests. 195 195 * 196 196 * @return callable Returns a function that accepts the next handler. -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Pool.php
r3201267 r3369397 87 87 * @param array|\Iterator $requests Requests to send concurrently. 88 88 * @param array $options Passes through the options available in 89 * {@see \GuzzleHttp\Pool::__construct}89 * {@see Pool::__construct} 90 90 * 91 91 * @return array Returns an array containing the response or an exception -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/Utils.php
r3201267 r3369397 80 80 * The returned handler is not wrapped by any default middlewares. 81 81 * 82 * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.82 * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system. 83 83 * 84 84 * @throws \RuntimeException if no viable Handler is available. -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/guzzle/src/functions.php
r3201267 r3369397 51 51 * The returned handler is not wrapped by any default middlewares. 52 52 * 53 * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.53 * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system. 54 54 * 55 55 * @throws \RuntimeException if no viable Handler is available. -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/promises/CHANGELOG.md
r3201267 r3369397 1 1 # CHANGELOG 2 3 4 ## 2.3.0 - 2025-08-22 5 6 ### Added 7 8 - PHP 8.5 support 9 10 11 ## 2.2.0 - 2025-03-27 12 13 ### Fixed 14 15 - Revert "Allow an empty EachPromise to be resolved by running the queue" 16 17 18 ## 2.1.0 - 2025-03-27 19 20 ### Added 21 22 - Allow an empty EachPromise to be resolved by running the queue 2 23 3 24 -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/promises/README.md
r3201267 r3369397 42 42 |---------|---------------------|--------------| 43 43 | 1.x | Security fixes only | >=5.5,<8.3 | 44 | 2.x | Latest | >=7.2.5,<8. 5|44 | 2.x | Latest | >=7.2.5,<8.6 | 45 45 46 46 -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/promises/composer.json
r3201267 r3369397 31 31 "require-dev": { 32 32 "bamarni/composer-bin-plugin": "^1.8.2", 33 "phpunit/phpunit": "^8.5. 39 || ^9.6.20"33 "phpunit/phpunit": "^8.5.44 || ^9.6.25" 34 34 }, 35 35 "autoload": { -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/psr7/CHANGELOG.md
r3201267 r3369397 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## 2.8.0 - 2025-08-23 9 10 ### Added 11 12 - Allow empty lists as header values 13 14 ### Changed 15 16 - PHP 8.5 support 17 18 ## 2.7.1 - 2025-03-27 19 20 ### Fixed 21 22 - Fixed uppercase IPv6 addresses in URI 23 24 ### Changed 25 26 - Improve uploaded file error message 7 27 8 28 ## 2.7.0 - 2024-07-18 -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/psr7/README.md
r3201267 r3369397 26 26 |---------|---------------------|--------------| 27 27 | 1.x | EOL (2024-06-30) | >=5.4,<8.2 | 28 | 2.x | Latest | >=7.2.5,<8. 5|28 | 2.x | Latest | >=7.2.5,<8.6 | 29 29 30 30 -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/psr7/composer.json
r3201267 r3369397 63 63 "bamarni/composer-bin-plugin": "^1.8.2", 64 64 "http-interop/http-factory-tests": "0.9.0", 65 "phpunit/phpunit": "^8.5. 39 || ^9.6.20"65 "phpunit/phpunit": "^8.5.44 || ^9.6.25" 66 66 }, 67 67 "suggest": { -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/psr7/src/MessageTrait.php
r3201267 r3369397 173 173 if (!is_array($value)) { 174 174 return $this->trimAndValidateHeaderValues([$value]); 175 }176 177 if (count($value) === 0) {178 throw new \InvalidArgumentException('Header value can not be an empty array.');179 175 } 180 176 -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/psr7/src/UploadedFile.php
r3201267 r3369397 12 12 class UploadedFile implements UploadedFileInterface 13 13 { 14 private const ERROR S= [15 UPLOAD_ERR_OK ,16 UPLOAD_ERR_INI_SIZE ,17 UPLOAD_ERR_FORM_SIZE ,18 UPLOAD_ERR_PARTIAL ,19 UPLOAD_ERR_NO_FILE ,20 UPLOAD_ERR_NO_TMP_DIR ,21 UPLOAD_ERR_CANT_WRITE ,22 UPLOAD_ERR_EXTENSION ,14 private const ERROR_MAP = [ 15 UPLOAD_ERR_OK => 'UPLOAD_ERR_OK', 16 UPLOAD_ERR_INI_SIZE => 'UPLOAD_ERR_INI_SIZE', 17 UPLOAD_ERR_FORM_SIZE => 'UPLOAD_ERR_FORM_SIZE', 18 UPLOAD_ERR_PARTIAL => 'UPLOAD_ERR_PARTIAL', 19 UPLOAD_ERR_NO_FILE => 'UPLOAD_ERR_NO_FILE', 20 UPLOAD_ERR_NO_TMP_DIR => 'UPLOAD_ERR_NO_TMP_DIR', 21 UPLOAD_ERR_CANT_WRITE => 'UPLOAD_ERR_CANT_WRITE', 22 UPLOAD_ERR_EXTENSION => 'UPLOAD_ERR_EXTENSION', 23 23 ]; 24 24 … … 105 105 private function setError(int $error): void 106 106 { 107 if ( false === in_array($error, UploadedFile::ERRORS, true)) {107 if (!isset(UploadedFile::ERROR_MAP[$error])) { 108 108 throw new InvalidArgumentException( 109 109 'Invalid error status for UploadedFile' … … 138 138 { 139 139 if (false === $this->isOk()) { 140 throw new RuntimeException( 'Cannot retrieve stream due to upload error');140 throw new RuntimeException(\sprintf('Cannot retrieve stream due to upload error (%s)', self::ERROR_MAP[$this->error])); 141 141 } 142 142 -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/psr7/src/Uri.php
r3201267 r3369397 108 108 // If IPv6 109 109 $prefix = ''; 110 if (preg_match('%^(.*://\[[0-9:a-f ]+\])(.*?)$%', $url, $matches)) {110 if (preg_match('%^(.*://\[[0-9:a-fA-F]+\])(.*?)$%', $url, $matches)) { 111 111 /** @var array{0:string, 1:string, 2:string} $matches */ 112 112 $prefix = $matches[1]; -
obs-huaweicloud/tags/1.4.2/sdk/vendor/guzzlehttp/psr7/src/Utils.php
r3201267 r3369397 398 398 399 399 if ($ex) { 400 /** @var $ex \RuntimeException*/400 /** @var \RuntimeException $ex */ 401 401 throw $ex; 402 402 } … … 445 445 446 446 if ($ex) { 447 /** @var $ex \RuntimeException*/447 /** @var \RuntimeException $ex */ 448 448 throw $ex; 449 449 } -
obs-huaweicloud/trunk/huaweicloud-obs-wordpress.php
r3214598 r3369397 4 4 Plugin URI: https://github.com/sy-records/huaweicloud-obs-wordpress 5 5 Description: 使用华为云对象存储服务 OBS 作为附件存储空间。(This is a plugin that uses HuaWei Cloud Object Storage Service for attachments remote saving.) 6 Version: 1.4. 16 Version: 1.4.2 7 7 Author: 沈唁 8 8 Author URI: https://qq52o.me … … 15 15 use Obs\ObsException; 16 16 17 define('OBS_VERSION', '1.4. 1');17 define('OBS_VERSION', '1.4.2'); 18 18 define('OBS_BASEFOLDER', plugin_basename(dirname(__FILE__))); 19 19 … … 136 136 $bucket = obs_get_bucket_name(); 137 137 $obsClient = obs_get_client(); 138 $obsClient->deleteObject( array('Bucket' => $bucket, 'Key' => $file));138 $obsClient->deleteObject(['Bucket' => $bucket, 'Key' => $file]); 139 139 } 140 140 … … 153 153 $bucket = obs_get_bucket_name(); 154 154 $obsClient = obs_get_client(); 155 $obsClient->deleteObjects( array('Bucket' => $bucket, 'Objects' => $deleteObjects, 'Quiet' => false));155 $obsClient->deleteObjects(['Bucket' => $bucket, 'Objects' => $deleteObjects, 'Quiet' => false]); 156 156 } 157 157 … … 308 308 309 309 // 当upload_path为根目录时,需要移除URL中出现的“绝对路径” 310 function obs_mod efiy_img_url($url, $post_id)310 function obs_modify_img_url($url, $post_id) 311 311 { 312 312 // 移除 ./ 和 项目根路径 313 $url = str_replace(['./', get_home_path()], '', $url); 314 return $url; 313 return str_replace(['./', get_home_path()], '', $url); 315 314 } 316 315 317 316 if (get_option('upload_path') == '.') { 318 add_filter('wp_get_attachment_url', 'obs_mod efiy_img_url', 30, 2);317 add_filter('wp_get_attachment_url', 'obs_modify_img_url', 30, 2); 319 318 } 320 319 … … 332 331 } 333 332 add_filter('sanitize_file_name', 'obs_sanitize_file_name', 10, 1); 334 335 function obs_function_each(&$array)336 {337 $res = [];338 $key = key($array);339 if ($key !== null) {340 next($array);341 $res[1] = $res['value'] = $array[$key];342 $res[0] = $res['key'] = $key;343 } else {344 $res = false;345 }346 return $res;347 }348 333 349 334 /** … … 439 424 wp_die('Insufficient privileges!'); 440 425 } 426 if (!empty($_POST) && !empty($_POST['type'])) { 427 $nonce = $_POST["{$_POST['type']}-nonce"] ?? ''; 428 if (empty($nonce) || !wp_verify_nonce($nonce, $_POST['type'])) { 429 wp_die('Illegal requests!'); 430 } 431 } 441 432 $options = []; 442 if (!empty($_POST) && $_POST['type'] == ' obs_set') {433 if (!empty($_POST) && $_POST['type'] == 'huaweicloud_obs_set') { 443 434 $options['bucket'] = isset($_POST['bucket']) ? sanitize_text_field($_POST['bucket']) : ''; 444 435 $options['regional'] = isset($_POST['regional']) ? sanitize_text_field($_POST['regional']) : ''; … … 447 438 $options['nothumb'] = isset($_POST['nothumb']) ? 'true' : 'false'; 448 439 $options['nolocalsaving'] = isset($_POST['nolocalsaving']) ? 'true' : 'false'; 449 //仅用于插件卸载时比较使用450 440 $options['upload_url_path'] = isset($_POST['upload_url_path']) ? sanitize_text_field(stripslashes($_POST['upload_url_path'])) : ''; 451 441 $options['update_file_name'] = isset($_POST['update_file_name']) ? sanitize_text_field($_POST['update_file_name']) : 'false'; … … 465 455 $new_url = esc_url_raw($_POST['new_url']); 466 456 467 if (!empty($old_url) && !empty($new_url)) {457 if (!empty($old_url)) { 468 458 global $wpdb; 469 459 // 文章内容 … … 511 501 512 502 $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://'; 513 ?>503 ?> 514 504 <div class="wrap" style="margin: 10px;"> 515 505 <h1>华为云 OBS 设置 <span style="font-size: 13px;">当前版本:<?php echo OBS_VERSION; ?></span></h1> 516 506 <p>如果觉得此插件对你有所帮助,不妨到 <a href="https://github.com/sy-records/huaweicloud-obs-wordpress" target="_blank">GitHub</a> 上点个<code>Star</code>,<code>Watch</code>关注更新;<a href="https://go.qq52o.me/qm/ccs" target="_blank">欢迎加入云存储插件交流群,QQ群号:887595381</a>;</p> 517 507 <hr/> 518 <form name="form1" method="post" action="<?php echo wp_nonce_url('./options-general.php?page=' . OBS_BASEFOLDER . '/huaweicloud-obs-wordpress.php'); ?>">508 <form method="post"> 519 509 <table class="form-table"> 520 510 <tr> … … 523 513 </th> 524 514 <td> 525 <input type="text" name="bucket" value="<?php echo $obs_bucket; ?>" size="50" placeholder="请填写桶名称"/>515 <input type="text" name="bucket" required value="<?php echo $obs_bucket; ?>" size="50" placeholder="请填写桶名称"/> 526 516 527 517 <p>请先访问 <a href="https://storage.huaweicloud.com/obs/?region=cn-east-3#/obs/create" target="_blank">华为云控制台</a> 创建<code>桶</code>,再填写以上内容。</p> … … 541 531 <legend>key</legend> 542 532 </th> 543 <td><input type="text" name="key" value="<?php echo $obs_key; ?>" size="50" placeholder="key"/></td>533 <td><input type="text" name="key" required value="<?php echo $obs_key; ?>" size="50" placeholder="key"/></td> 544 534 </tr> 545 535 <tr> … … 548 538 </th> 549 539 <td> 550 <input type="text" name="secret" value="<?php echo $obs_secret; ?>" size="50" placeholder="secret"/>540 <input type="text" name="secret" required value="<?php echo $obs_secret; ?>" size="50" placeholder="secret"/> 551 541 </td> 552 542 </tr> … … 586 576 </th> 587 577 <td> 588 <input type="text" name="upload_path" value="<?php echo $upload_path; ?>" size="50" placeholder="请输入上传文件夹"/>578 <input type="text" name="upload_path" required value="<?php echo $upload_path; ?>" size="50" placeholder="请输入上传文件夹"/> 589 579 <p>附件在服务器上的存储位置,例如: <code>wp-content/uploads</code> (注意不要以“/”开头和结尾),根目录请输入<code>.</code>。</p> 590 580 </td> … … 595 585 </th> 596 586 <td> 597 <input type="text" name="upload_url_path" value="<?php echo $upload_url_path; ?>" size="50" placeholder="请输入URL前缀"/>587 <input type="text" name="upload_url_path" required value="<?php echo $upload_url_path; ?>" size="50" placeholder="请输入URL前缀"/> 598 588 599 589 <p><b>注意:</b></p> … … 608 598 <tr> 609 599 <th><legend>保存/更新选项</legend></th> 610 <td><input type="submit" name="submit"class="button button-primary" value="保存更改"/></td>600 <td><input type="submit" class="button button-primary" value="保存更改"/></td> 611 601 </tr> 612 602 </table> 613 <input type="hidden" name="type" value="obs_set"> 603 <input type="hidden" name="type" value="huaweicloud_obs_set"> 604 <?php wp_nonce_field('huaweicloud_obs_set', 'huaweicloud_obs_set-nonce'); ?> 614 605 </form> 615 <form name="form2" method="post" action="<?php echo wp_nonce_url('./options-general.php?page=' . OBS_BASEFOLDER . '/huaweicloud-obs-wordpress.php'); ?>">606 <form method="post"> 616 607 <table class="form-table"> 617 608 <tr> … … 620 611 </th> 621 612 <input type="hidden" name="type" value="huaweicloud_obs_all"> 622 <td> 623 <input type="submit" name="submit" class="button button-secondary" value="开始同步"/> 613 <?php wp_nonce_field('huaweicloud_obs_all', 'huaweicloud_obs_all-nonce'); ?> 614 <td> 615 <input type="submit" class="button button-secondary" value="开始同步"/> 624 616 <p><b>注意:如果是首次同步,执行时间将会十分十分长(根据你的历史附件数量),有可能会因执行时间过长,页面显示超时或者报错。<br> 所以,建议那些几千上万附件的大神们,考虑官方的 <a target="_blank" rel="nofollow" href="https://support.huaweicloud.com/utiltg-obs/obs_11_0001.html">同步工具</a></b></p> 625 617 </td> … … 628 620 </form> 629 621 <hr> 630 <form name="form3" method="post" action="<?php echo wp_nonce_url('./options-general.php?page=' . OBS_BASEFOLDER . '/huaweicloud-obs-wordpress.php'); ?>">622 <form method="post"> 631 623 <table class="form-table"> 632 624 <tr> … … 651 643 </th> 652 644 <input type="hidden" name="type" value="huaweicloud_obs_replace"> 653 <td> 654 <input type="submit" name="submit" class="button button-secondary" value="开始替换"/> 645 <?php wp_nonce_field('huaweicloud_obs_replace', 'huaweicloud_obs_replace-nonce'); ?> 646 <td> 647 <input type="submit" class="button button-secondary" value="开始替换"/> 655 648 <p><b>注意:如果是首次替换,请注意备份!此功能会替换文章以及设置的特色图片(题图)等使用的资源链接</b></p> 656 649 </td> -
obs-huaweicloud/trunk/sdk/vendor/autoload.php
r3201267 r3369397 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 -
obs-huaweicloud/trunk/sdk/vendor/composer/InstalledVersions.php
r3214598 r3369397 28 28 { 29 29 /** 30 * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to 31 * @internal 32 */ 33 private static $selfDir = null; 34 35 /** 30 36 * @var mixed[]|null 31 37 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 38 */ 33 39 private static $installed; 40 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 34 45 35 46 /** … … 310 321 self::$installed = $data; 311 322 self::$installedByVendor = array(); 323 324 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 325 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 326 // so we have to assume it does not, and that may result in duplicate data being returned when listing 327 // all installed packages for example 328 self::$installedIsLocalDir = false; 329 } 330 331 /** 332 * @return string 333 */ 334 private static function getSelfDir() 335 { 336 if (self::$selfDir === null) { 337 self::$selfDir = strtr(__DIR__, '\\', '/'); 338 } 339 340 return self::$selfDir; 312 341 } 313 342 … … 326 355 327 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 328 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 329 360 if (isset(self::$installedByVendor[$vendorDir])) { 330 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 334 365 self::$installedByVendor[$vendorDir] = $required; 335 366 $installed[] = $required; 336 if (s trtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {367 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 337 368 self::$installed = $required; 338 $copiedLocalDir = true;369 self::$installedIsLocalDir = true; 339 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 340 374 } 341 375 } -
obs-huaweicloud/trunk/sdk/vendor/composer/autoload_psr4.php
r3214598 r3369397 8 8 return array( 9 9 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 10 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http- message/src', $vendorDir . '/psr/http-factory/src'),10 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 11 11 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 12 12 'Obs\\' => array($vendorDir . '/obs/esdk-obs-php/Obs'), -
obs-huaweicloud/trunk/sdk/vendor/composer/autoload_static.php
r3214598 r3369397 43 43 'Psr\\Http\\Message\\' => 44 44 array ( 45 0 => __DIR__ . '/..' . '/psr/http- message/src',46 1 => __DIR__ . '/..' . '/psr/http- factory/src',45 0 => __DIR__ . '/..' . '/psr/http-factory/src', 46 1 => __DIR__ . '/..' . '/psr/http-message/src', 47 47 ), 48 48 'Psr\\Http\\Client\\' => -
obs-huaweicloud/trunk/sdk/vendor/composer/installed.json
r3214598 r3369397 3 3 { 4 4 "name": "guzzlehttp/guzzle", 5 "version": "7. 9.2",6 "version_normalized": "7. 9.2.0",5 "version": "7.10.0", 6 "version_normalized": "7.10.0.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/guzzle/guzzle.git", 10 "reference": " d281ed313b989f213357e3be1a179f02196ac99b"11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ d281ed313b989f213357e3be1a179f02196ac99b",15 "reference": " d281ed313b989f213357e3be1a179f02196ac99b",10 "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4" 11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", 15 "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", 16 16 "shasum": "" 17 17 }, 18 18 "require": { 19 19 "ext-json": "*", 20 "guzzlehttp/promises": "^ 1.5.3 || ^2.0.3",21 "guzzlehttp/psr7": "^2. 7.0",20 "guzzlehttp/promises": "^2.3", 21 "guzzlehttp/psr7": "^2.8", 22 22 "php": "^7.2.5 || ^8.0", 23 23 "psr/http-client": "^1.0", … … 40 40 "psr/log": "Required for using the Log middleware" 41 41 }, 42 "time": "202 4-07-24T11:22:20+00:00",42 "time": "2025-08-23T22:36:01+00:00", 43 43 "type": "library", 44 44 "extra": { … … 112 112 "support": { 113 113 "issues": "https://github.com/guzzle/guzzle/issues", 114 "source": "https://github.com/guzzle/guzzle/tree/7. 9.2"114 "source": "https://github.com/guzzle/guzzle/tree/7.10.0" 115 115 }, 116 116 "funding": [ … … 132 132 { 133 133 "name": "guzzlehttp/promises", 134 "version": "2. 0.4",135 "version_normalized": "2. 0.4.0",134 "version": "2.3.0", 135 "version_normalized": "2.3.0.0", 136 136 "source": { 137 137 "type": "git", 138 138 "url": "https://github.com/guzzle/promises.git", 139 "reference": " f9c436286ab2892c7db7be8c8da4ef61ccf7b455"140 }, 141 "dist": { 142 "type": "zip", 143 "url": "https://api.github.com/repos/guzzle/promises/zipball/ f9c436286ab2892c7db7be8c8da4ef61ccf7b455",144 "reference": " f9c436286ab2892c7db7be8c8da4ef61ccf7b455",139 "reference": "481557b130ef3790cf82b713667b43030dc9c957" 140 }, 141 "dist": { 142 "type": "zip", 143 "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957", 144 "reference": "481557b130ef3790cf82b713667b43030dc9c957", 145 145 "shasum": "" 146 146 }, … … 150 150 "require-dev": { 151 151 "bamarni/composer-bin-plugin": "^1.8.2", 152 "phpunit/phpunit": "^8.5. 39 || ^9.6.20"153 }, 154 "time": "202 4-10-17T10:06:22+00:00",152 "phpunit/phpunit": "^8.5.44 || ^9.6.25" 153 }, 154 "time": "2025-08-22T14:34:08+00:00", 155 155 "type": "library", 156 156 "extra": { … … 198 198 "support": { 199 199 "issues": "https://github.com/guzzle/promises/issues", 200 "source": "https://github.com/guzzle/promises/tree/2. 0.4"200 "source": "https://github.com/guzzle/promises/tree/2.3.0" 201 201 }, 202 202 "funding": [ … … 218 218 { 219 219 "name": "guzzlehttp/psr7", 220 "version": "2. 7.0",221 "version_normalized": "2. 7.0.0",220 "version": "2.8.0", 221 "version_normalized": "2.8.0.0", 222 222 "source": { 223 223 "type": "git", 224 224 "url": "https://github.com/guzzle/psr7.git", 225 "reference": " a70f5c95fb43bc83f07c9c948baa0dc1829bf201"226 }, 227 "dist": { 228 "type": "zip", 229 "url": "https://api.github.com/repos/guzzle/psr7/zipball/ a70f5c95fb43bc83f07c9c948baa0dc1829bf201",230 "reference": " a70f5c95fb43bc83f07c9c948baa0dc1829bf201",225 "reference": "21dc724a0583619cd1652f673303492272778051" 226 }, 227 "dist": { 228 "type": "zip", 229 "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051", 230 "reference": "21dc724a0583619cd1652f673303492272778051", 231 231 "shasum": "" 232 232 }, … … 244 244 "bamarni/composer-bin-plugin": "^1.8.2", 245 245 "http-interop/http-factory-tests": "0.9.0", 246 "phpunit/phpunit": "^8.5. 39 || ^9.6.20"246 "phpunit/phpunit": "^8.5.44 || ^9.6.25" 247 247 }, 248 248 "suggest": { 249 249 "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" 250 250 }, 251 "time": "202 4-07-18T11:15:46+00:00",251 "time": "2025-08-23T21:21:41+00:00", 252 252 "type": "library", 253 253 "extra": { … … 317 317 "support": { 318 318 "issues": "https://github.com/guzzle/psr7/issues", 319 "source": "https://github.com/guzzle/psr7/tree/2. 7.0"319 "source": "https://github.com/guzzle/psr7/tree/2.8.0" 320 320 }, 321 321 "funding": [ -
obs-huaweicloud/trunk/sdk/vendor/composer/installed.php
r3214598 r3369397 2 2 'root' => array( 3 3 'name' => '__root__', 4 'pretty_version' => 'v1.4. 1',5 'version' => '1.4. 1.0',6 'reference' => ' 7159428a1d70b2aded4ddfcc856abee3267e0a5c',4 'pretty_version' => 'v1.4.2', 5 'version' => '1.4.2.0', 6 'reference' => 'd0cfeb435a9113df0a92abf4b722675a6822835e', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 '__root__' => array( 14 'pretty_version' => 'v1.4. 1',15 'version' => '1.4. 1.0',16 'reference' => ' 7159428a1d70b2aded4ddfcc856abee3267e0a5c',14 'pretty_version' => 'v1.4.2', 15 'version' => '1.4.2.0', 16 'reference' => 'd0cfeb435a9113df0a92abf4b722675a6822835e', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', … … 21 21 ), 22 22 'guzzlehttp/guzzle' => array( 23 'pretty_version' => '7. 9.2',24 'version' => '7. 9.2.0',25 'reference' => ' d281ed313b989f213357e3be1a179f02196ac99b',23 'pretty_version' => '7.10.0', 24 'version' => '7.10.0.0', 25 'reference' => 'b51ac707cfa420b7bfd4e4d5e510ba8008e822b4', 26 26 'type' => 'library', 27 27 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', … … 30 30 ), 31 31 'guzzlehttp/promises' => array( 32 'pretty_version' => '2. 0.4',33 'version' => '2. 0.4.0',34 'reference' => ' f9c436286ab2892c7db7be8c8da4ef61ccf7b455',32 'pretty_version' => '2.3.0', 33 'version' => '2.3.0.0', 34 'reference' => '481557b130ef3790cf82b713667b43030dc9c957', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../guzzlehttp/promises', … … 39 39 ), 40 40 'guzzlehttp/psr7' => array( 41 'pretty_version' => '2. 7.0',42 'version' => '2. 7.0.0',43 'reference' => ' a70f5c95fb43bc83f07c9c948baa0dc1829bf201',41 'pretty_version' => '2.8.0', 42 'version' => '2.8.0.0', 43 'reference' => '21dc724a0583619cd1652f673303492272778051', 44 44 'type' => 'library', 45 45 'install_path' => __DIR__ . '/../guzzlehttp/psr7', -
obs-huaweicloud/trunk/sdk/vendor/composer/platform_check.php
r3201267 r3369397 20 20 } 21 21 } 22 trigger_error( 23 'Composer detected issues in your platform: ' . implode(' ', $issues), 24 E_USER_ERROR 22 throw new \RuntimeException( 23 'Composer detected issues in your platform: ' . implode(' ', $issues) 25 24 ); 26 25 } -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/CHANGELOG.md
r3201267 r3369397 2 2 3 3 Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version. 4 5 ## 7.10.0 - 2025-08-23 6 7 ### Added 8 9 - Support for PHP 8.5 10 11 ### Changed 12 13 - Adjusted `guzzlehttp/promises` version constraint to `^2.3` 14 - Adjusted `guzzlehttp/psr7` version constraint to `^2.8` 15 16 17 ## 7.9.3 - 2025-03-27 18 19 ### Changed 20 21 - Remove explicit content-length header for GET requests 22 - Improve compatibility with bad servers for boolean cookie values 4 23 5 24 -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/composer.json
r3201267 r3369397 82 82 "php": "^7.2.5 || ^8.0", 83 83 "ext-json": "*", 84 "guzzlehttp/promises": "^ 1.5.3 || ^2.0.3",85 "guzzlehttp/psr7": "^2. 7.0",84 "guzzlehttp/promises": "^2.3", 85 "guzzlehttp/psr7": "^2.8", 86 86 "psr/http-client": "^1.0", 87 87 "symfony/deprecation-contracts": "^2.2 || ^3.0" -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
r3201267 r3369397 63 63 $data[$search] = (int) $value; 64 64 } 65 } elseif ($search === 'Secure' || $search === 'Discard' || $search === 'HttpOnly') { 66 if ($value) { 67 $data[$search] = true; 68 } 65 69 } else { 66 70 $data[$search] = $value; -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
r3201267 r3369397 126 126 127 127 if (\count($this->handles) >= $this->maxHandles) { 128 \curl_close($resource); 128 if (PHP_VERSION_ID < 80000) { 129 \curl_close($resource); 130 } 129 131 } else { 130 132 // Remove all callback functions as they can hold onto references … … 730 732 { 731 733 foreach ($this->handles as $id => $handle) { 732 \curl_close($handle); 734 if (PHP_VERSION_ID < 80000) { 735 \curl_close($handle); 736 } 737 733 738 unset($this->handles[$id]); 734 739 } -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
r3201267 r3369397 241 241 unset($this->delays[$id], $this->handles[$id]); 242 242 \curl_multi_remove_handle($this->_mh, $handle); 243 \curl_close($handle); 243 244 if (PHP_VERSION_ID < 80000) { 245 \curl_close($handle); 246 } 244 247 245 248 return true; -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php
r3201267 r3369397 18 18 * requests to another handler. 19 19 * 20 * @param callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses21 * @param callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync Handler used for synchronous responses.20 * @param callable(RequestInterface, array): PromiseInterface $default Handler used for normal responses 21 * @param callable(RequestInterface, array): PromiseInterface $sync Handler used for synchronous responses. 22 22 * 23 * @return callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.23 * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler. 24 24 */ 25 25 public static function wrapSync(callable $default, callable $sync): callable … … 38 38 * through the StreamHandler. 39 39 * 40 * @param callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for non-streaming responses41 * @param callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses40 * @param callable(RequestInterface, array): PromiseInterface $default Handler used for non-streaming responses 41 * @param callable(RequestInterface, array): PromiseInterface $streaming Handler used for streaming responses 42 42 * 43 * @return callable( \Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.43 * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler. 44 44 */ 45 45 public static function wrapStreaming(callable $default, callable $streaming): callable -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
r3201267 r3369397 54 54 55 55 // Append a content-length header if body size is zero to match 56 // cURL's behavior. 57 if (0 === $request->getBody()->getSize()) { 56 // the behavior of `CurlHandler` 57 if ( 58 ( 59 0 === \strcasecmp('PUT', $request->getMethod()) 60 || 0 === \strcasecmp('POST', $request->getMethod()) 61 ) 62 && 0 === $request->getBody()->getSize() 63 ) { 58 64 $request = $request->withHeader('Content-Length', '0'); 59 65 } … … 328 334 329 335 return $this->createResource( 330 function () use ($uri, &$http_response_header,$contextResource, $context, $options, $request) {336 function () use ($uri, $contextResource, $context, $options, $request) { 331 337 $resource = @\fopen((string) $uri, 'r', false, $contextResource); 338 339 // See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable 340 if (function_exists('http_get_last_response_headers')) { 341 /** @var array|null */ 342 $http_response_header = \http_get_last_response_headers(); 343 } 344 332 345 $this->lastHeaders = $http_response_header ?? []; 333 346 -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/src/Middleware.php
r3201267 r3369397 188 188 * formatter. 189 189 * 190 * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.191 *192 190 * @param LoggerInterface $logger Logs messages. 193 191 * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings. 194 192 * @param string $logLevel Level at which to log requests. 193 * 194 * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests. 195 195 * 196 196 * @return callable Returns a function that accepts the next handler. -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/src/Pool.php
r3201267 r3369397 87 87 * @param array|\Iterator $requests Requests to send concurrently. 88 88 * @param array $options Passes through the options available in 89 * {@see \GuzzleHttp\Pool::__construct}89 * {@see Pool::__construct} 90 90 * 91 91 * @return array Returns an array containing the response or an exception -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/src/Utils.php
r3201267 r3369397 80 80 * The returned handler is not wrapped by any default middlewares. 81 81 * 82 * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.82 * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system. 83 83 * 84 84 * @throws \RuntimeException if no viable Handler is available. -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/guzzle/src/functions.php
r3201267 r3369397 51 51 * The returned handler is not wrapped by any default middlewares. 52 52 * 53 * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.53 * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system. 54 54 * 55 55 * @throws \RuntimeException if no viable Handler is available. -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/promises/CHANGELOG.md
r3201267 r3369397 1 1 # CHANGELOG 2 3 4 ## 2.3.0 - 2025-08-22 5 6 ### Added 7 8 - PHP 8.5 support 9 10 11 ## 2.2.0 - 2025-03-27 12 13 ### Fixed 14 15 - Revert "Allow an empty EachPromise to be resolved by running the queue" 16 17 18 ## 2.1.0 - 2025-03-27 19 20 ### Added 21 22 - Allow an empty EachPromise to be resolved by running the queue 2 23 3 24 -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/promises/README.md
r3201267 r3369397 42 42 |---------|---------------------|--------------| 43 43 | 1.x | Security fixes only | >=5.5,<8.3 | 44 | 2.x | Latest | >=7.2.5,<8. 5|44 | 2.x | Latest | >=7.2.5,<8.6 | 45 45 46 46 -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/promises/composer.json
r3201267 r3369397 31 31 "require-dev": { 32 32 "bamarni/composer-bin-plugin": "^1.8.2", 33 "phpunit/phpunit": "^8.5. 39 || ^9.6.20"33 "phpunit/phpunit": "^8.5.44 || ^9.6.25" 34 34 }, 35 35 "autoload": { -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/psr7/CHANGELOG.md
r3201267 r3369397 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## 2.8.0 - 2025-08-23 9 10 ### Added 11 12 - Allow empty lists as header values 13 14 ### Changed 15 16 - PHP 8.5 support 17 18 ## 2.7.1 - 2025-03-27 19 20 ### Fixed 21 22 - Fixed uppercase IPv6 addresses in URI 23 24 ### Changed 25 26 - Improve uploaded file error message 7 27 8 28 ## 2.7.0 - 2024-07-18 -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/psr7/README.md
r3201267 r3369397 26 26 |---------|---------------------|--------------| 27 27 | 1.x | EOL (2024-06-30) | >=5.4,<8.2 | 28 | 2.x | Latest | >=7.2.5,<8. 5|28 | 2.x | Latest | >=7.2.5,<8.6 | 29 29 30 30 -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/psr7/composer.json
r3201267 r3369397 63 63 "bamarni/composer-bin-plugin": "^1.8.2", 64 64 "http-interop/http-factory-tests": "0.9.0", 65 "phpunit/phpunit": "^8.5. 39 || ^9.6.20"65 "phpunit/phpunit": "^8.5.44 || ^9.6.25" 66 66 }, 67 67 "suggest": { -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/psr7/src/MessageTrait.php
r3201267 r3369397 173 173 if (!is_array($value)) { 174 174 return $this->trimAndValidateHeaderValues([$value]); 175 }176 177 if (count($value) === 0) {178 throw new \InvalidArgumentException('Header value can not be an empty array.');179 175 } 180 176 -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/psr7/src/UploadedFile.php
r3201267 r3369397 12 12 class UploadedFile implements UploadedFileInterface 13 13 { 14 private const ERROR S= [15 UPLOAD_ERR_OK ,16 UPLOAD_ERR_INI_SIZE ,17 UPLOAD_ERR_FORM_SIZE ,18 UPLOAD_ERR_PARTIAL ,19 UPLOAD_ERR_NO_FILE ,20 UPLOAD_ERR_NO_TMP_DIR ,21 UPLOAD_ERR_CANT_WRITE ,22 UPLOAD_ERR_EXTENSION ,14 private const ERROR_MAP = [ 15 UPLOAD_ERR_OK => 'UPLOAD_ERR_OK', 16 UPLOAD_ERR_INI_SIZE => 'UPLOAD_ERR_INI_SIZE', 17 UPLOAD_ERR_FORM_SIZE => 'UPLOAD_ERR_FORM_SIZE', 18 UPLOAD_ERR_PARTIAL => 'UPLOAD_ERR_PARTIAL', 19 UPLOAD_ERR_NO_FILE => 'UPLOAD_ERR_NO_FILE', 20 UPLOAD_ERR_NO_TMP_DIR => 'UPLOAD_ERR_NO_TMP_DIR', 21 UPLOAD_ERR_CANT_WRITE => 'UPLOAD_ERR_CANT_WRITE', 22 UPLOAD_ERR_EXTENSION => 'UPLOAD_ERR_EXTENSION', 23 23 ]; 24 24 … … 105 105 private function setError(int $error): void 106 106 { 107 if ( false === in_array($error, UploadedFile::ERRORS, true)) {107 if (!isset(UploadedFile::ERROR_MAP[$error])) { 108 108 throw new InvalidArgumentException( 109 109 'Invalid error status for UploadedFile' … … 138 138 { 139 139 if (false === $this->isOk()) { 140 throw new RuntimeException( 'Cannot retrieve stream due to upload error');140 throw new RuntimeException(\sprintf('Cannot retrieve stream due to upload error (%s)', self::ERROR_MAP[$this->error])); 141 141 } 142 142 -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/psr7/src/Uri.php
r3201267 r3369397 108 108 // If IPv6 109 109 $prefix = ''; 110 if (preg_match('%^(.*://\[[0-9:a-f ]+\])(.*?)$%', $url, $matches)) {110 if (preg_match('%^(.*://\[[0-9:a-fA-F]+\])(.*?)$%', $url, $matches)) { 111 111 /** @var array{0:string, 1:string, 2:string} $matches */ 112 112 $prefix = $matches[1]; -
obs-huaweicloud/trunk/sdk/vendor/guzzlehttp/psr7/src/Utils.php
r3201267 r3369397 398 398 399 399 if ($ex) { 400 /** @var $ex \RuntimeException*/400 /** @var \RuntimeException $ex */ 401 401 throw $ex; 402 402 } … … 445 445 446 446 if ($ex) { 447 /** @var $ex \RuntimeException*/447 /** @var \RuntimeException $ex */ 448 448 throw $ex; 449 449 }
Note: See TracChangeset
for help on using the changeset viewer.