Issues (896)

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.

woothemes-sensei.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
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 46 and the first side effect is on line 31.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
/*
3
Plugin Name: Sensei
4
Plugin URI: http://www.woothemes.com/products/sensei/
5
Description: A course management plugin that offers the smoothest platform for helping you teach anything.
6
Version: 1.9.2
7
Author: WooThemes
8
Author URI: http://www.woothemes.com/
9
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
Requires at least: 4.1
11
Tested up to: 4.2
12
Text Domain: woothemes-sensei
13
Domain path: /lang/
14
*/
15
/*  Copyright 2013  WooThemes  (email : [email protected])
16
17
    This program is free software; you can redistribute it and/or modify
18
    it under the terms of the GNU General Public License, version 2, as
19
    published by the Free Software Foundation.
20
21
    This program is distributed in the hope that it will be useful,
22
    but WITHOUT ANY WARRANTY; without even the implied warranty of
23
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
    GNU General Public License for more details.
25
26
    You should have received a copy of the GNU General Public License
27
    along with this program; if not, write to the Free Software
28
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
29
*/
30
31
	if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
32
33
    require_once( 'includes/class-sensei-autoloader.php' );
34
    require_once( 'includes/lib/woo-functions.php' );
35
    require_once( 'includes/sensei-functions.php' );
36
37
    if ( ! is_admin() ) {
38
        require_once( 'includes/template-functions.php' );
39
    }
40
41
    /**
42
     * Returns the global Sensei Instance.
43
     *
44
     * @since 1.8.0
45
     */
46
    function Sensei(){
47
48
        return Sensei_Main::instance();
49
50
    }
51
52
	// set the sensei version number
53
	Sensei()->version = '1.9.2';
54
55
    //backwards compatibility
56
    global $woothemes_sensei;
57
    $woothemes_sensei = Sensei();
58
59
    /**
60
    * Hook in WooCommerce functionality
61
    */
62
    if( Sensei_WC::is_woocommerce_active() ){
63
        add_action('init', array( 'Sensei_WC', 'load_woocommerce_integration_hooks' ) );
64
    }
65
66
    /**
67
     * Load all Template hooks
68
    */
69
    if(! is_admin() ){
70
71
        require_once( 'includes/hooks/template.php' );
72
73
    }
74
75
    /**
76
     * Plugin updates
77
     * @since  1.0.1
78
     */
79
    woothemes_queue_update( plugin_basename( __FILE__ ), 'bad2a02a063555b7e2bee59924690763', 152116 );
80
81
    /**
82
     * Sensei Activation Hook registration
83
     * @since 1.8.0
84
     */
85
    register_activation_hook( __FILE__, 'activate_sensei' );
86
87
    /**
88
     * Activate_sensei
89
     *
90
     * All the activation checks needed to ensure Sensei is ready for use
91
     * @since 1.8.0
92
     */
93
    function activate_sensei () {
94
95
        // create the teacher role on activation and ensure that it has all the needed capabilities
96
        Sensei()->teacher->create_role();
97
98
        //Setup all the role capabilities needed
99
        Sensei()->updates->add_sensei_caps();
100
        Sensei()->updates->add_editor_caps();
101
        Sensei()->updates->assign_role_caps();
102
103
        //Flush rules
104
        add_action( 'activated_plugin' , array( 'Sensei_Main','activation_flush_rules' ), 10 );
105
106
        //Load the Welcome Screen
107
        add_action( 'activated_plugin' , array( 'Sensei_Welcome','redirect' ), 20 );
108
109
    }// end activate_sensei
110