Issues (72)

Security Analysis    no request data  

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.

functions.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
 * WordPress Settings
4
 *
5
 * Add setting pages with Amarkal UI components to your WordPress theme or 
6
 * plugin.
7
 *
8
 * @package   amarkal-settings
9
 * @depends   amarkal-ui
10
 * @author    Askupa Software <[email protected]>
11
 * @link      https://github.com/askupasoftware/amarkal-settings
12
 * @copyright 2017 Askupa Software
13
 */
14
15
// Prevent direct file access
16
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
17
18
/**
19
 * Prevent loading the library more than once
20
 */
21
if( defined( 'AMARKAL_SETTINGS' ) ) return false;
22
define( 'AMARKAL_SETTINGS', true );
23
24
if(!function_exists('amarkal_add_settings_page'))
25
{
26
    /**
27
     * Add a new settings page
28
     *
29
     * @param [array] $args
0 ignored issues
show
The doc-type [array] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
30
     * @return void
31
     */
32
    function amarkal_add_settings_page( $args )
33
    {
34
        $manager = Amarkal\Settings\Manager::get_instance();
35
        return $manager->add_settings_page($args);
36
    }
37
}
38
39
if(!function_exists('amarkal_get_settings_page'))
40
{
41
    /**
42
     * Get a settings page instance
43
     *
44
     * @param string $slug
45
     * @return Amarkal\Settings\SettingsPage
46
     */
47
    function amarkal_get_settings_page( $slug )
48
    {
49
        $manager = Amarkal\Settings\Manager::get_instance();
50
        return $manager->get_settings_page($slug);
51
    }
52
}
53
54
if(!function_exists('amarkal_get_settings_value'))
55
{
56
    /**
57
     * Get the value of the given settings field
58
     *
59
     * @param string $slug
60
     * @param string $field_name
61
     * @return any
62
     */
63
    function amarkal_get_settings_value( $slug, $field_name )
64
    {
65
        $manager = Amarkal\Settings\Manager::get_instance();
66
        $page = $manager->get_settings_page($slug);
67
        return $page->get_field_value($field_name);
68
    }
69
}
70
71
if(!function_exists('amarkal_get_settings_values'))
72
{
73
    /**
74
     * Get all the values for the given settings page as an array
75
     *
76
     * @param string $slug
77
     * @return array
78
     */
79
    function amarkal_get_settings_values( $slug )
80
    {
81
        $manager = Amarkal\Settings\Manager::get_instance();
82
        $page = $manager->get_settings_page($slug);
83
        return $page->get_field_values();
84
    }
85
}