Changeset 14681
- Timestamp:
- 03/09/2026 06:37:33 AM (4 months ago)
- Location:
- sites/trunk
- Files:
-
- 13 edited
-
api.wordpress.org/public_html/dotorg/trac/pr/adhocore-php-jwt/JWT.php (modified) (2 diffs)
-
common/includes/slack/trac/bot.php (modified) (1 diff)
-
common/includes/slack/trac/comment-handler.php (modified) (1 diff)
-
common/includes/slack/trac/resource.php (modified) (1 diff)
-
wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-notifications.php (modified) (1 diff)
-
wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-route-translation-helpers.php (modified) (3 diffs)
-
wordpress.org/public_html/wp-content/plugins/photo-directory/inc/photo.php (modified) (3 diffs)
-
wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/adhocore-php-jwt/JWT.php (modified) (5 diffs)
-
wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/adhocore-php-jwt/ValidatesJWT.php (modified) (2 diffs)
-
wordpress.org/public_html/wp-content/plugins/theme-directory/lib/adhocore-php-jwt/JWT.php (modified) (5 diffs)
-
wordpress.org/public_html/wp-content/plugins/theme-directory/lib/adhocore-php-jwt/ValidatesJWT.php (modified) (2 diffs)
-
wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/cli/class-stats.php (modified) (2 diffs)
-
wordpress.org/public_html/wp-content/plugins/wporg-gp-profiles/profiles.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/pr/adhocore-php-jwt/JWT.php
r14331 r14681 85 85 int $maxAge = 3600, 86 86 int $leeway = 0, 87 string $pass = null87 ?string $pass = null 88 88 ) { 89 89 $this->validateConfig($key, $algo, $maxAge, $leeway); … … 180 180 * @param int|null $timestamp 181 181 */ 182 public function setTestTimestamp( int $timestamp = null): self182 public function setTestTimestamp(?int $timestamp = null): self 183 183 { 184 184 $this->timestamp = $timestamp; -
sites/trunk/common/includes/slack/trac/bot.php
r14678 r14681 22 22 23 23 protected $parsed = array(); 24 protected $post_data; 24 25 25 26 // We want to post to Trac no more than once per two hours, and to Slack no more than once every 10 minutes. -
sites/trunk/common/includes/slack/trac/comment-handler.php
r7111 r14681 4 4 5 5 class Comment_Handler { 6 7 protected $send; 8 protected $lines; 9 protected $trac; 10 protected $title; 11 protected $author; 12 protected $comment; 13 protected $changes; 14 protected $ticket_id; 15 protected $ticket_url; 16 protected $comment_id; 17 protected $comment_url; 6 18 7 19 function __construct( \Dotorg\Slack\Send $send, array $email_message ) { -
sites/trunk/common/includes/slack/trac/resource.php
r14341 r14681 7 7 8 8 protected $data; 9 protected $trac; 10 protected $id; 9 11 10 12 static protected $instances = array(); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-notifications.php
r12205 r14681 208 208 * @return array The emails to be notified from the thread comments. 209 209 */ 210 public static function get_commenters_email_addresses( array $comments, string $email_address_to_ignore = null ): array {210 public static function get_commenters_email_addresses( array $comments, ?string $email_address_to_ignore = null ): array { 211 211 $email_addresses = array(); 212 212 foreach ( $comments as $comment ) { -
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-route-translation-helpers.php
r12926 r14681 251 251 * @return string JSON with the content of each section. 252 252 */ 253 public function ajax_translation_helpers_locale( string $project_path, string $locale_slug, string $set_slug, int $original_id, int $translation_id = null ) {253 public function ajax_translation_helpers_locale( string $project_path, string $locale_slug, string $set_slug, int $original_id, ?int $translation_id = null ) { 254 254 return $this->ajax_translation_helpers( $project_path, $original_id, $translation_id, $locale_slug, $set_slug ); 255 255 } … … 268 268 * @return void Prints the JSON with the content of each section. 269 269 */ 270 public function ajax_translation_helpers( string $project_path, int $original_id, int $translation_id = null, string $locale_slug = null,string $set_slug = null ): void {270 public function ajax_translation_helpers( string $project_path, int $original_id, ?int $translation_id = null, ?string $locale_slug = null, ?string $set_slug = null ): void { 271 271 $project = GP::$project->by_path( $project_path ); 272 272 if ( ! $project ) { … … 348 348 * @return string The full permalink. 349 349 */ 350 public static function get_permalink( string $project_path, ?int $original_id, string $set_slug = null,string $locale_slug = null ): string {350 public static function get_permalink( string $project_path, ?int $original_id, ?string $set_slug = null, ?string $locale_slug = null ): string { 351 351 $permalink = $project_path . '/' . $original_id; 352 352 if ( $set_slug && $locale_slug ) { -
sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/photo.php
r14650 r14681 386 386 foreach ( array( 'title', 'caption', 'credit', 'copyright', 'camera', 'iso' ) as $key ) { 387 387 if ( $meta[ $key ] && ! seems_utf8( $meta[ $key ] ) ) { 388 $meta[ $key ] = utf8_encode( $meta[ $key ]);388 $meta[ $key ] = mb_convert_encoding( $meta[ $key ], 'UTF-8', 'ISO-8859-1' ); 389 389 } 390 390 } … … 392 392 foreach ( $meta['keywords'] as $key => $keyword ) { 393 393 if ( ! seems_utf8( $keyword ) ) { 394 $meta['keywords'][ $key ] = utf8_encode( $keyword);394 $meta['keywords'][ $key ] = mb_convert_encoding( $keyword, 'UTF-8', 'ISO-8859-1' ); 395 395 } 396 396 } … … 991 991 992 992 if ( $text && ! seems_utf8( $text ) ) { 993 $text = utf8_encode( $text);993 $text = mb_convert_encoding( $text, 'UTF-8', 'ISO-8859-1' ); 994 994 } 995 995 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/adhocore-php-jwt/JWT.php
r9564 r14681 85 85 int $maxAge = 3600, 86 86 int $leeway = 0, 87 string $pass = null87 ?string $pass = null 88 88 ) { 89 89 $this->validateConfig($key, $algo, $maxAge, $leeway); … … 144 144 * 145 145 * @param string $token 146 * @param bool $verify 146 147 * 147 148 * @throws JWTException … … 149 150 * @return array 150 151 */ 151 public function decode(string $token ): array152 public function decode(string $token, bool $verify = true): array 152 153 { 153 154 if (\substr_count($token, '.') < 2) { … … 156 157 157 158 $token = \explode('.', $token, 3); 159 if (!$verify) { 160 return (array) $this->urlSafeDecode($token[1]); 161 } 162 158 163 $this->validateHeader((array) $this->urlSafeDecode($token[0])); 159 164 … … 175 180 * @param int|null $timestamp 176 181 */ 177 public function setTestTimestamp( int $timestamp = null): self182 public function setTestTimestamp(?int $timestamp = null): self 178 183 { 179 184 $this->timestamp = $timestamp; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/adhocore-php-jwt/ValidatesJWT.php
r9564 r14681 87 87 ['exp', $this->leeway /* */ , static::ERROR_TOKEN_EXPIRED, 'Expired'], 88 88 ['iat', $this->maxAge - $this->leeway, static::ERROR_TOKEN_EXPIRED, 'Expired'], 89 ['nbf', $this->maxAge -$this->leeway, static::ERROR_TOKEN_NOT_NOW, 'Not now'],89 ['nbf', -$this->leeway, static::ERROR_TOKEN_NOT_NOW, 'Not now'], 90 90 ]; 91 91 … … 115 115 } 116 116 117 if (!\is_resource($this->key)) { 117 if (\PHP_VERSION_ID < 80000 && !\is_resource($this->key)) { 118 throw new JWTException('Invalid key: Should be resource of private key', static::ERROR_KEY_INVALID); 119 } 120 121 if (\PHP_VERSION_ID > 80000 && !( 122 $this->key instanceof \OpenSSLAsymmetricKey 123 || $this->key instanceof \OpenSSLCertificate 124 || $this->key instanceof \OpenSSLCertificateSigningRequest 125 )) { 118 126 throw new JWTException('Invalid key: Should be resource of private key', static::ERROR_KEY_INVALID); 119 127 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/lib/adhocore-php-jwt/JWT.php
r9564 r14681 85 85 int $maxAge = 3600, 86 86 int $leeway = 0, 87 string $pass = null87 ?string $pass = null 88 88 ) { 89 89 $this->validateConfig($key, $algo, $maxAge, $leeway); … … 144 144 * 145 145 * @param string $token 146 * @param bool $verify 146 147 * 147 148 * @throws JWTException … … 149 150 * @return array 150 151 */ 151 public function decode(string $token ): array152 public function decode(string $token, bool $verify = true): array 152 153 { 153 154 if (\substr_count($token, '.') < 2) { … … 156 157 157 158 $token = \explode('.', $token, 3); 159 if (!$verify) { 160 return (array) $this->urlSafeDecode($token[1]); 161 } 162 158 163 $this->validateHeader((array) $this->urlSafeDecode($token[0])); 159 164 … … 175 180 * @param int|null $timestamp 176 181 */ 177 public function setTestTimestamp( int $timestamp = null): self182 public function setTestTimestamp(?int $timestamp = null): self 178 183 { 179 184 $this->timestamp = $timestamp; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/lib/adhocore-php-jwt/ValidatesJWT.php
r9564 r14681 87 87 ['exp', $this->leeway /* */ , static::ERROR_TOKEN_EXPIRED, 'Expired'], 88 88 ['iat', $this->maxAge - $this->leeway, static::ERROR_TOKEN_EXPIRED, 'Expired'], 89 ['nbf', $this->maxAge -$this->leeway, static::ERROR_TOKEN_NOT_NOW, 'Not now'],89 ['nbf', -$this->leeway, static::ERROR_TOKEN_NOT_NOW, 'Not now'], 90 90 ]; 91 91 … … 115 115 } 116 116 117 if (!\is_resource($this->key)) { 117 if (\PHP_VERSION_ID < 80000 && !\is_resource($this->key)) { 118 throw new JWTException('Invalid key: Should be resource of private key', static::ERROR_KEY_INVALID); 119 } 120 121 if (\PHP_VERSION_ID > 80000 && !( 122 $this->key instanceof \OpenSSLAsymmetricKey 123 || $this->key instanceof \OpenSSLCertificate 124 || $this->key instanceof \OpenSSLCertificateSigningRequest 125 )) { 118 126 throw new JWTException('Invalid key: Should be resource of private key', static::ERROR_KEY_INVALID); 119 127 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/cli/class-stats.php
r14029 r14681 164 164 * @return void 165 165 */ 166 public function __invoke( bool $echo_the_values = false, string $old_date = null ): void {166 public function __invoke( bool $echo_the_values = false, ?string $old_date = null ): void { 167 167 global $wpdb; 168 168 … … 1629 1629 * @return array 1630 1630 */ 1631 private function get_forums_stats( string $type, int $year = null ): array {1631 private function get_forums_stats( string $type, ?int $year = null ): array { 1632 1632 global $wpdb; 1633 1633 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-profiles/profiles.php
r11974 r14681 39 39 * Add a activity when strings are suggested and approved. 40 40 */ 41 function add_single_translation_activity( GP_Translation $new_translation, GP_Translation $previous_translation = null ) : void {41 function add_single_translation_activity( GP_Translation $new_translation, ?GP_Translation $previous_translation = null ) : void { 42 42 if ( ! should_notify( $new_translation->user_id ) ) { 43 43 return;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)