Issues (4141)

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.

app/Controller/HomeController.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
class HomeController extends AppController{	
4
	
5
	public function beforeFilter(){
6
		return true;
7
   	}
8
9
	function index(){
10
		$this->layout = 'winners';
11
	}
12
13
	function servicos(){
14
		$this->layout = 'winners';
15
	}
16
17
	function contact(){
18
		$this->layout = 'winners';
19
	}
20
21
	function timeline(){
22
		$this->layout = 'winners';
23
	}
24
25
	function developers(){
26
		$this->layout = 'winners';
27
	}
28
29
	function cases(){
30
		$this->layout = 'winners';
31
	}
32
33
	function login() {
34
		$this->set('admin', false);
35
		
36
		$this->layout = 'login';
37
	}
38
39
	function enviar_email() {
40
		$dados = $this->request->data('dados');
41
42
		// Check for empty fields
43
		if(empty($dados['name'])  		||
44
   			empty($dados['email']) 		||
45
   			empty($dados['message'])	||
46
   			!filter_var($dados['email'], FILTER_VALIDATE_EMAIL)) {
47
				$this->Session->setFlash('Você deve preencher todos os dados!');
48
	            return $this->redirect('/');
49
		}	
50
	
51
		$name = $dados['name'];
52
		$email_address = $dados['email'];
53
		$message = $dados['message'];
54
	
55
		// Create the email and send the message
56
		$to = '[email protected]'; // Add your email address inbetween the '' replacing [email protected] - This is where the form will send a message to.
57
		$email_subject = "Contato Winners Desenvolvimento";
58
		$email_body = "Mensagem site: ".$message;
59
		$headers = "From: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected].
60
		$headers .= "Reply-To: $email_address";	
61
		mail($to,$email_subject,$email_body,$headers);
62
		//resposta automatica ao cliente
63
		$to = $email_address;
64
		$email_subject = '[email protected]';
65
		$email_body = "A sua mensagem foi recebida, em breve responderemos";
66
		$headers = "From: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected].
67
		$headers .= "Reply-To: $email_address";	
68
69
		mail($to,$email_subject,$email_body,$headers);
70
71
		$this->Session->setFlash('O e-mail foi enviado em breve entraremos em contato!');
72
73
        return $this->redirect('/');
74
	}
75
76
	public function sendmail() {
77
		App::uses('CakeEmail', 'Network/Email');
78
79
		$email = new CakeEmail('default');
80
		$email->from('[email protected]', 'reginaldo')
81
			->to('[email protected]')
82
			->subject('Contato CakePHP MyStore');
83
		$mensagem = '
84
				<p><strong>Nome</strong>: adfasdf</p>
85
				<p><strong>Email</strong>: fasdf@laksjdf</p>
86
				<p><strong>Telefone</strong>: asdfasdf</p>
87
				<p><strong>Mensagem</strong>:fasdf</p>
88
			';
89
		
90
		if ($email->send($mensagem)) {
91
			echo('Mensagem enviada com sucesso');
92
		} else {
93
			echo('Sua mensagem não foi enviada, tente denovo');
94
		}
95
96
		exit();
0 ignored issues
show
Coding Style Compatibility introduced by
The method sendmail() contains an exit expression.

An exit expression should only be used in rare cases. For example, if you write a short command line script.

In most cases however, using an exit expression makes the code untestable and often causes incompatibilities with other libraries. Thus, unless you are absolutely sure it is required here, we recommend to refactor your code to avoid its usage.

Loading history...
97
	}
98
99
}
100