Issues (4967)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

template-parts/post/content-video.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * Template part for displaying video posts
4
 *
5
 * @link https://codex.wordpress.org/Template_Hierarchy
6
 *
7
 * @package WordPress
8
 * @subpackage Twenty_Seventeen
9
 * @since 1.0
10
 * @version 1.2
11
 */
12
13
?>
14
15
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
16
	<?php
17
		if ( is_sticky() && is_home() ) {
18
			echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) );
19
		}
20
	?>
21
	<header class="entry-header">
22
		<?php
23 View Code Duplication
			if ( 'post' === get_post_type() ) {
24
				echo '<div class="entry-meta">';
25
					if ( is_single() ) {
26
						twentyseventeen_posted_on();
27
					} else {
28
						echo twentyseventeen_time_link();
29
						twentyseventeen_edit_link();
30
					}
31
				echo '</div><!-- .entry-meta -->';
32
			};
33
34 View Code Duplication
			if ( is_single() ) {
35
				the_title( '<h1 class="entry-title">', '</h1>' );
36
			} elseif ( is_front_page() && is_home() ) {
37
				the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' );
0 ignored issues
show
It seems like get_permalink() can also be of type false; however, esc_url() does only seem to accept string, did you maybe forget to handle an error condition?
Loading history...
38
			} else {
39
				the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
40
			}
41
		?>
42
	</header><!-- .entry-header -->
43
44
	<?php
45
		$content = apply_filters( 'the_content', get_the_content() );
46
		$video = false;
47
48
		// Only get video from the content if a playlist isn't present.
49
		if ( false === strpos( $content, 'wp-playlist-script' ) ) {
50
			$video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) );
51
		}
52
	?>
53
54 View Code Duplication
	<?php if ( '' !== get_the_post_thumbnail() && ! is_single() && empty( $video ) ) : ?>
55
		<div class="post-thumbnail">
56
			<a href="<?php the_permalink(); ?>">
57
				<?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?>
58
			</a>
59
		</div><!-- .post-thumbnail -->
60
	<?php endif; ?>
61
62
	<div class="entry-content">
63
64
		<?php
65
		if ( ! is_single() ) {
66
67
			// If not a single post, highlight the video file.
68
			if ( ! empty( $video ) ) {
69
				foreach ( $video as $video_html ) {
70
					echo '<div class="entry-video">';
71
						echo $video_html;
72
					echo '</div>';
73
				}
74
			};
75
76
		};
77
78 View Code Duplication
		if ( is_single() || empty( $video ) ) {
79
80
			/* translators: %s: Name of current post */
81
			the_content( sprintf(
82
				__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
83
				get_the_title()
84
			) );
85
86
			wp_link_pages( array(
87
				'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
88
				'after'       => '</div>',
89
				'link_before' => '<span class="page-number">',
90
				'link_after'  => '</span>',
91
			) );
92
		};
93
		?>
94
95
	</div><!-- .entry-content -->
96
97
	<?php
98
	if ( is_single() ) {
99
		twentyseventeen_entry_footer();
100
	}
101
	?>
102
103
</article><!-- #post-## -->
104