Changeset 3245852
- Timestamp:
- 02/24/2025 03:45:25 PM (10 months ago)
- Location:
- anthologize
- Files:
-
- 14 edited
- 1 copied
-
tags/0.8.3 (copied) (copied from anthologize/trunk)
-
tags/0.8.3/anthologize.php (modified) (2 diffs)
-
tags/0.8.3/includes/class-admin-main.php (modified) (2 diffs)
-
tags/0.8.3/includes/class-new-project.php (modified) (3 diffs)
-
tags/0.8.3/includes/class-project-organizer.php (modified) (1 diff)
-
tags/0.8.3/readme.txt (modified) (1 diff)
-
tags/0.8.3/vendor/composer/InstalledVersions.php (modified) (5 diffs)
-
tags/0.8.3/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/anthologize.php (modified) (2 diffs)
-
trunk/includes/class-admin-main.php (modified) (2 diffs)
-
trunk/includes/class-new-project.php (modified) (3 diffs)
-
trunk/includes/class-project-organizer.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/vendor/composer/InstalledVersions.php (modified) (5 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
anthologize/tags/0.8.3/anthologize.php
r3208665 r3245852 4 4 Plugin URI: http://anthologize.org 5 5 Description: Use the power of WordPress to transform your content into a book. 6 Version: 0.8. 26 Version: 0.8.3 7 7 Text Domain: anthologize 8 8 Author: One Week | One Tool … … 31 31 32 32 if ( ! defined( 'ANTHOLOGIZE_VERSION' ) ) 33 define( 'ANTHOLOGIZE_VERSION', '0.8. 2' );33 define( 'ANTHOLOGIZE_VERSION', '0.8.3' ); 34 34 35 35 require dirname( __FILE__ ) . '/vendor/autoload.php'; -
anthologize/tags/0.8.3/includes/class-admin-main.php
r3208665 r3245852 468 468 if ( isset( $_GET['action'] ) ) { 469 469 if ( $_GET['action'] == 'delete' && $project ) { 470 wp_delete_post( $project->ID ); 470 check_admin_referer( 'anthologize_delete_project' ); 471 472 if ( current_user_can( 'delete_post', $project->ID ) ) { 473 wp_delete_post( $project->ID ); 474 } 471 475 } 472 476 … … 552 556 $controlActions = array(); 553 557 $the_id = get_the_ID(); 558 559 $delete_url = wp_nonce_url( admin_url( 'admin.php?page=anthologize&action=delete&project_id=' . $the_id ), 'anthologize_delete_project' ); 560 554 561 $controlActions[] = '<a href="admin.php?page=anthologize_new_project&project_id=' . esc_attr( $the_id ) . '">' . __( 'Project Details', 'anthologize' ) . '</a>'; 555 562 $controlActions[] = '<a href="admin.php?page=anthologize&action=edit&project_id=' . esc_attr( $the_id ) . '">' . __( 'Manage Parts', 'anthologize' ) . '</a>'; 556 $controlActions[] = '<a href=" admin.php?page=anthologize&action=delete&project_id=' . esc_attr( $the_id) . '" class="confirm-delete">' . __( 'Delete Project', 'anthologize' ) . '</a>';563 $controlActions[] = '<a href="' . esc_url( $delete_url ) . '" class="confirm-delete">' . __( 'Delete Project', 'anthologize' ) . '</a>'; 557 564 ?> 558 565 -
anthologize/tags/0.8.3/includes/class-new-project.php
r3208665 r3245852 126 126 127 127 if ( isset( $_POST['save_project'] ) ) { 128 check_admin_referer( 'anthologize_new_project' ); 128 129 $this->save_project(); 129 130 return; … … 159 160 <tr valign="top"> 160 161 <th scope="row"><label for="project-title"><?php _e( 'Project Title', 'anthologize' ); ?></label></th> 161 <td><input type="text" name="post_title" id="project-title" value="162 162 <?php 163 if ( $project ) { 164 echo esc_attr( $project->post_title );} 163 $existing_project_title = $project ? $project->post_title : ''; 165 164 ?> 166 "></td>165 <td><input type="text" name="post_title" id="project-title" value="<?php echo esc_attr( $existing_project_title ); ?>"></td> 167 166 </tr> 168 167 169 168 <tr valign="top"> 170 169 <th scope="row"><label for="project-subtitle"><?php _e( 'Subtitle', 'anthologize' ); ?></label> 171 <td><input type="text" name="anthologize_meta[subtitle]" id="project-subtitle" value="172 170 <?php 173 if ( $project && ! empty( $meta['subtitle'] ) ) { 174 echo esc_attr( $meta['subtitle'] );} 171 $existing_subtitle = $project ? $meta['subtitle'] : ''; 175 172 ?> 176 " /></td>173 <td><input type="text" name="anthologize_meta[subtitle]" id="project-subtitle" value="<?php echo esc_attr( $existing_subtitle ); ?>" /></td> 177 174 </tr> 178 175 … … 195 192 196 193 <div class="anthologize-button"><input type="submit" name="save_project" value="<?php _e( 'Save Project', 'anthologize' ); ?>"></div> 197 <input type="hidden" name="project_id" value=" 198 <?php 199 if ( $project ) { 200 echo esc_attr( $project->ID );} 201 ?> 202 "> 194 <?php $existing_project_id = $project ? $project->ID : ''; ?> 195 <input type="hidden" name="project_id" value="<?php echo esc_attr( $existing_project_id ); ?>"> 196 197 <?php wp_nonce_field( 'anthologize_new_project' ); ?> 198 203 199 </form> 204 200 -
anthologize/tags/0.8.3/includes/class-project-organizer.php
r3208665 r3245852 70 70 <a href="admin.php?page=anthologize_new_project&project_id=<?php echo esc_attr( $this->project_id ); ?>"><?php _e( 'Project Details', 'anthologize' ); ?></a> | 71 71 <a target="_blank" href="<?php echo esc_url( $this->preview_url( $this->project_id, 'anth_project' ) ); ?>"><?php _e( 'Preview Project', 'anthologize' ); ?></a> | 72 <a href=" admin.php?page=anthologize&action=delete&project_id=<?php echo esc_attr( $this->project_id); ?>" class="confirm-delete"><?php _e( 'Delete Project', 'anthologize' ); ?></a>72 <a href="<?php echo esc_attr( wp_nonce_url( admin_url( 'admin.php?page=anthologize&action=delete&project_id=' . $this->project_id ), 'anthologize_delete_project' ) ); ?>" class="confirm-delete"><?php _e( 'Delete Project', 'anthologize' ); ?></a> 73 73 </div> 74 74 </h2> -
anthologize/tags/0.8.3/readme.txt
r3208665 r3245852 60 60 61 61 == Changelog == 62 63 = 0.8.3 = 64 * Fixed security vulnerability when deleting or creating projects 62 65 63 66 = 0.8.2 = -
anthologize/tags/0.8.3/vendor/composer/InstalledVersions.php
r3208665 r3245852 32 32 */ 33 33 private static $installed; 34 35 /** 36 * @var bool 37 */ 38 private static $installedIsLocalDir; 34 39 35 40 /** … … 310 315 self::$installed = $data; 311 316 self::$installedByVendor = array(); 317 318 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 319 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 320 // so we have to assume it does not, and that may result in duplicate data being returned when listing 321 // all installed packages for example 322 self::$installedIsLocalDir = false; 312 323 } 313 324 … … 323 334 324 335 $installed = array(); 336 $copiedLocalDir = false; 325 337 326 338 if (self::$canGetVendors) { 339 $selfDir = strtr(__DIR__, '\\', '/'); 327 340 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 341 $vendorDir = strtr($vendorDir, '\\', '/'); 328 342 if (isset(self::$installedByVendor[$vendorDir])) { 329 343 $installed[] = self::$installedByVendor[$vendorDir]; … … 331 345 /** @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[]}>} $required */ 332 346 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 335 self::$installed = $installed[count($installed) - 1]; 347 self::$installedByVendor[$vendorDir] = $required; 348 $installed[] = $required; 349 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 350 self::$installed = $required; 351 self::$installedIsLocalDir = true; 336 352 } 353 } 354 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 355 $copiedLocalDir = true; 337 356 } 338 357 } … … 351 370 } 352 371 353 if (self::$installed !== array() ) {372 if (self::$installed !== array() && !$copiedLocalDir) { 354 373 $installed[] = self::$installed; 355 374 } -
anthologize/tags/0.8.3/vendor/composer/installed.php
r3208665 r3245852 4 4 'pretty_version' => '0.8.x-dev', 5 5 'version' => '0.8.9999999.9999999-dev', 6 'reference' => ' ab984c003a2ace922d87f1e7f29d78110f401804',6 'reference' => '1e60e8f970f44326fabf5c33edbb7df31f16ee55', 7 7 'type' => 'project', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => '0.8.x-dev', 15 15 'version' => '0.8.9999999.9999999-dev', 16 'reference' => ' ab984c003a2ace922d87f1e7f29d78110f401804',16 'reference' => '1e60e8f970f44326fabf5c33edbb7df31f16ee55', 17 17 'type' => 'project', 18 18 'install_path' => __DIR__ . '/../../', -
anthologize/trunk/anthologize.php
r3208665 r3245852 4 4 Plugin URI: http://anthologize.org 5 5 Description: Use the power of WordPress to transform your content into a book. 6 Version: 0.8. 26 Version: 0.8.3 7 7 Text Domain: anthologize 8 8 Author: One Week | One Tool … … 31 31 32 32 if ( ! defined( 'ANTHOLOGIZE_VERSION' ) ) 33 define( 'ANTHOLOGIZE_VERSION', '0.8. 2' );33 define( 'ANTHOLOGIZE_VERSION', '0.8.3' ); 34 34 35 35 require dirname( __FILE__ ) . '/vendor/autoload.php'; -
anthologize/trunk/includes/class-admin-main.php
r3208665 r3245852 468 468 if ( isset( $_GET['action'] ) ) { 469 469 if ( $_GET['action'] == 'delete' && $project ) { 470 wp_delete_post( $project->ID ); 470 check_admin_referer( 'anthologize_delete_project' ); 471 472 if ( current_user_can( 'delete_post', $project->ID ) ) { 473 wp_delete_post( $project->ID ); 474 } 471 475 } 472 476 … … 552 556 $controlActions = array(); 553 557 $the_id = get_the_ID(); 558 559 $delete_url = wp_nonce_url( admin_url( 'admin.php?page=anthologize&action=delete&project_id=' . $the_id ), 'anthologize_delete_project' ); 560 554 561 $controlActions[] = '<a href="admin.php?page=anthologize_new_project&project_id=' . esc_attr( $the_id ) . '">' . __( 'Project Details', 'anthologize' ) . '</a>'; 555 562 $controlActions[] = '<a href="admin.php?page=anthologize&action=edit&project_id=' . esc_attr( $the_id ) . '">' . __( 'Manage Parts', 'anthologize' ) . '</a>'; 556 $controlActions[] = '<a href=" admin.php?page=anthologize&action=delete&project_id=' . esc_attr( $the_id) . '" class="confirm-delete">' . __( 'Delete Project', 'anthologize' ) . '</a>';563 $controlActions[] = '<a href="' . esc_url( $delete_url ) . '" class="confirm-delete">' . __( 'Delete Project', 'anthologize' ) . '</a>'; 557 564 ?> 558 565 -
anthologize/trunk/includes/class-new-project.php
r3208665 r3245852 126 126 127 127 if ( isset( $_POST['save_project'] ) ) { 128 check_admin_referer( 'anthologize_new_project' ); 128 129 $this->save_project(); 129 130 return; … … 159 160 <tr valign="top"> 160 161 <th scope="row"><label for="project-title"><?php _e( 'Project Title', 'anthologize' ); ?></label></th> 161 <td><input type="text" name="post_title" id="project-title" value="162 162 <?php 163 if ( $project ) { 164 echo esc_attr( $project->post_title );} 163 $existing_project_title = $project ? $project->post_title : ''; 165 164 ?> 166 "></td>165 <td><input type="text" name="post_title" id="project-title" value="<?php echo esc_attr( $existing_project_title ); ?>"></td> 167 166 </tr> 168 167 169 168 <tr valign="top"> 170 169 <th scope="row"><label for="project-subtitle"><?php _e( 'Subtitle', 'anthologize' ); ?></label> 171 <td><input type="text" name="anthologize_meta[subtitle]" id="project-subtitle" value="172 170 <?php 173 if ( $project && ! empty( $meta['subtitle'] ) ) { 174 echo esc_attr( $meta['subtitle'] );} 171 $existing_subtitle = $project ? $meta['subtitle'] : ''; 175 172 ?> 176 " /></td>173 <td><input type="text" name="anthologize_meta[subtitle]" id="project-subtitle" value="<?php echo esc_attr( $existing_subtitle ); ?>" /></td> 177 174 </tr> 178 175 … … 195 192 196 193 <div class="anthologize-button"><input type="submit" name="save_project" value="<?php _e( 'Save Project', 'anthologize' ); ?>"></div> 197 <input type="hidden" name="project_id" value=" 198 <?php 199 if ( $project ) { 200 echo esc_attr( $project->ID );} 201 ?> 202 "> 194 <?php $existing_project_id = $project ? $project->ID : ''; ?> 195 <input type="hidden" name="project_id" value="<?php echo esc_attr( $existing_project_id ); ?>"> 196 197 <?php wp_nonce_field( 'anthologize_new_project' ); ?> 198 203 199 </form> 204 200 -
anthologize/trunk/includes/class-project-organizer.php
r3208665 r3245852 70 70 <a href="admin.php?page=anthologize_new_project&project_id=<?php echo esc_attr( $this->project_id ); ?>"><?php _e( 'Project Details', 'anthologize' ); ?></a> | 71 71 <a target="_blank" href="<?php echo esc_url( $this->preview_url( $this->project_id, 'anth_project' ) ); ?>"><?php _e( 'Preview Project', 'anthologize' ); ?></a> | 72 <a href=" admin.php?page=anthologize&action=delete&project_id=<?php echo esc_attr( $this->project_id); ?>" class="confirm-delete"><?php _e( 'Delete Project', 'anthologize' ); ?></a>72 <a href="<?php echo esc_attr( wp_nonce_url( admin_url( 'admin.php?page=anthologize&action=delete&project_id=' . $this->project_id ), 'anthologize_delete_project' ) ); ?>" class="confirm-delete"><?php _e( 'Delete Project', 'anthologize' ); ?></a> 73 73 </div> 74 74 </h2> -
anthologize/trunk/readme.txt
r3208665 r3245852 60 60 61 61 == Changelog == 62 63 = 0.8.3 = 64 * Fixed security vulnerability when deleting or creating projects 62 65 63 66 = 0.8.2 = -
anthologize/trunk/vendor/composer/InstalledVersions.php
r3208665 r3245852 32 32 */ 33 33 private static $installed; 34 35 /** 36 * @var bool 37 */ 38 private static $installedIsLocalDir; 34 39 35 40 /** … … 310 315 self::$installed = $data; 311 316 self::$installedByVendor = array(); 317 318 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 319 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 320 // so we have to assume it does not, and that may result in duplicate data being returned when listing 321 // all installed packages for example 322 self::$installedIsLocalDir = false; 312 323 } 313 324 … … 323 334 324 335 $installed = array(); 336 $copiedLocalDir = false; 325 337 326 338 if (self::$canGetVendors) { 339 $selfDir = strtr(__DIR__, '\\', '/'); 327 340 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 341 $vendorDir = strtr($vendorDir, '\\', '/'); 328 342 if (isset(self::$installedByVendor[$vendorDir])) { 329 343 $installed[] = self::$installedByVendor[$vendorDir]; … … 331 345 /** @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[]}>} $required */ 332 346 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 335 self::$installed = $installed[count($installed) - 1]; 347 self::$installedByVendor[$vendorDir] = $required; 348 $installed[] = $required; 349 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 350 self::$installed = $required; 351 self::$installedIsLocalDir = true; 336 352 } 353 } 354 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 355 $copiedLocalDir = true; 337 356 } 338 357 } … … 351 370 } 352 371 353 if (self::$installed !== array() ) {372 if (self::$installed !== array() && !$copiedLocalDir) { 354 373 $installed[] = self::$installed; 355 374 } -
anthologize/trunk/vendor/composer/installed.php
r3208665 r3245852 4 4 'pretty_version' => '0.8.x-dev', 5 5 'version' => '0.8.9999999.9999999-dev', 6 'reference' => ' ab984c003a2ace922d87f1e7f29d78110f401804',6 'reference' => '1e60e8f970f44326fabf5c33edbb7df31f16ee55', 7 7 'type' => 'project', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => '0.8.x-dev', 15 15 'version' => '0.8.9999999.9999999-dev', 16 'reference' => ' ab984c003a2ace922d87f1e7f29d78110f401804',16 'reference' => '1e60e8f970f44326fabf5c33edbb7df31f16ee55', 17 17 'type' => 'project', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.