CVE-2013-10007 (PHP, published 2023-01-03T11:15Z)
Description: value: A vulnerability classified as problematic has been found in ethitter WP-Print-Friendly up to 0.5.2. This affects an unknown part of the file wp-print-friendly.php. The manipulation leads to information disclosure. It is possible to initiate the attack remotely. Upgrading to version 0.5.3 is able to address this issue. The identifier of the patch is 437787292670c20b4abe20160ebbe8428187f2b4. It is recommended to upgrade the affected component. The identifier VDB-217269 was assigned to this vulnerability.
Severity: nan (CVSS v3 base score: 7.5)
Weakness: CWE-200 \u2014 Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
Repository: https://github.com/ethitter/WP-Print-Friendly
Files changed:
readme.txt
wp-print-friendly.php
Commit message: Version 0.5.3 - Security Update

Security Update
* Correct security vulnerability allowing both private and password protected posts from being accessed through the print page
* Creates is_protected() method to determine if the print page should be visible to the current user
* Remove print_url links from the content when the current user does not have the necessary capabilities to view the print page
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss


Vulnerable code:
Contributors: ethitter, thinkoomph
Stable tag: 0.5.2
This release addresses numerous bugs reported by the community, including print templates for child pages. All admin text, save the plugin's name, are now ready for translation. Templates are now completely customizable, and new template functions are included.
Author: Erick Hitter & Oomph, Inc.
Version: 0.5.2
		if ( $this->is_print() && ( $print_template = $this->template_chooser() ) )
	 * @uses $this::get_options, $post, $this::print_url, get_query_var, apply_filters
?>

Fixed code:
Contributors: ethitter, stevenkword, thinkoomph
Stable tag: 0.5.3
= 0.5.3 =
* Creates is_protected() method to determine if the print page should be visible to the current user
* Correct security vulnerability allowing both private and password protected posts from being accessed through the print page
* Remove print_url links from the content when the current user does not have the necessary capabilities to view the print page

This release addresses numerous bugs reported by the community, including print templates for child pages. All admin text, save the plugin's name, are now ready for translation. Templates are now completely customizable, and new template functions are included.
Author: Erick Hitter, Steven K Word & Oomph, Inc.
Version: 0.5.3
		add_action( 'wp', array( $this, 'action_wp' ) );
	/**
	 * Determine if the print page should be visible to the current user
	 *
	 * @uses current_user_can, post_password_required
	 * @global $wp_query, $post
	 * @return bool
	 */
	public function is_protected() {
		global $post;

		// If the global $post object is not set OR BOTH the current user is NOT an admin AND the post is private
		$private = ( ! isset( $post ) || ( ! current_user_can( 'read_private_posts' ) && 'private' == $post->post_status ) ) ? true : false;

		// If the password is required OR if the current user does not have the capability to view private posts
		return post_password_required() || true === $private;
	}

	/**
	 * Throw a 404 if the print page should not be visible to the user
	 *
	 * @action wp
	 * @global $wp_query
	 * @uses $this::is_print, $this::is_protected
	 * @return null
	 */
	function action_wp() {
		global $wp_query;

		if( $this->is_print() && $this->is_protected() ) {
			$wp_query->set_404();
			status_header( 404 );
			nocache_headers();
		}
	}

	 * @uses this::is_protected
		if ( $this->is_print() && ! $this->is_protected() && ( $print_template = $this->template_chooser() ) )
	 * @uses $this::get_options, $post, $this::print_url, $this::is_protected, get_query_var, apply_filters
		// Do not display the print_url link if the print page is not be accessible to the user
		if( $this->is_protected() )
			return $content;

?>