Issues (114)

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.

protected/models/ContentMetadata.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
/**
4
 * This is the model class for table "content_metadata".
5
 *
6
 * The followings are the available columns in table 'content_metadata':
7
 * @property integer $id
8
 * @property integer $content_id
9
 * @property string $key
10
 * @property string $value
11
 * @property string $created
12
 * @property string $updated
13
 *
14
 * The followings are the available model relations:
15
 * @property Content $content
16
 */
17
class ContentMetadata extends CiiModel
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
18
{
19
	/**
20
	 * Returns the static model of the specified AR class.
21
	 * @param string $className active record class name.
22
	 * @return ContentMetadata the static model class
23
	 */
24
	public static function model($className=__CLASS__)
25
	{
26
		return parent::model($className);
27
	}
28
29
	/**
30
	 * @return string the associated database table name
31
	 */
32
	public function tableName()
33
	{
34
		return 'content_metadata';
35
	}
36
37
	/**
38
	 * @return array validation rules for model attributes.
39
	 */
40
	public function rules()
41
	{
42
		// NOTE: you should only define rules for those attributes that
43
		// will receive user inputs.
44
		return array(
45
			array('content_id, key, value', 'required'),
46
			array('content_id', 'numerical', 'integerOnly'=>true),
47
			array('key', 'length', 'max'=>50),
48
			// The following rule is used by search().
49
			array('id, content_id, key, value, created, updated', 'safe', 'on'=>'search'),
50
		);
51
	}
52
53
	/**
54
	 * @return array relational rules.
55
	 */
56
	public function relations()
57
	{
58
		// NOTE: you may need to adjust the relation name and the related
59
		// class name for the relations automatically generated below.
60
		return array(
61
			'content' => array(self::BELONGS_TO, 'Content', 'content_id'),
62
		);
63
	}
64
65
	/**
66
	 * @return array customized attribute labels (name=>label)
67
	 */
68
	public function attributeLabels()
69
	{
70
		return array(
71
			'content_id' => Yii::t('ciims.models.ContentMetadata', 'Content ID'),
72
			'key' 		 => Yii::t('ciims.models.ContentMetadata', 'Key'),
73
			'value' 	 => Yii::t('ciims.models.ContentMetadata', 'Value'),
74
			'created'	 => Yii::t('ciims.models.ContentMetadata', 'Created'),
75
			'updated' 	 => Yii::t('ciims.models.ContentMetadata', 'Updated')
76
		);
77
	}
78
79
	/**
80
	 * Retrieves a list of models based on the current search/filter conditions.
81
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
82
	 */
83
	public function search()
84
	{
85
		$criteria=new CDbCriteria;
86
87
		$criteria->compare('content_id',$this->content_id);
88
		$criteria->compare('t.key',$this->key,true);
89
		$criteria->compare('value',$this->value,true);
90
		$criteria->compare('created',$this->created,true);
91
		$criteria->compare('updated',$this->updated,true);
92
93
		return new CActiveDataProvider($this, array(
94
			'criteria'=>$criteria,
95
		));
96
	}
97
}
98