Issues (1940)

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.

programs/utilit/agent.api.php (1 issue)

Severity

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
 * OVIDENTIA http://www.ovidentia.org                                   *
4
 ************************************************************************
5
 * Copyright (c) 2003 by CANTICO ( http://www.cantico.fr )              *
6
 *                                                                      *
7
 * This file is part of Ovidentia.                                      *
8
 *                                                                      *
9
 * Ovidentia is free software; you can redistribute it and/or modify    *
10
 * it under the terms of the GNU General Public License as published by *
11
 * the Free Software Foundation; either version 2, or (at your option)  *
12
 * any later version.													*
13
 *																		*
14
 * This program is distributed in the hope that it will be useful, but  *
15
 * WITHOUT ANY WARRANTY; without even the implied warranty of			*
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.					*
17
 * See the  GNU General Public License for more details.				*
18
 *																		*
19
 * You should have received a copy of the GNU General Public License	*
20
 * along with this program; if not, write to the Free Software			*
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,*
22
 * USA.																	*
23
************************************************************************/
24
25
26
27
require_once dirname(__FILE__).'/../functions.php';
28
require_once dirname(__FILE__).'/agent.class.php';
29
30
class Func_AbsencesAgent extends bab_functionality 
31
{
32
	public function getDescription()
33
	{
34
		return absences_translate('Agent API from the absences addon');
35
	}
36
	
37
	/**
38
	 * Get agent by id_user
39
	 * @throws Exception if agent does not exists
40
	 * @return absences_Agent
41
	 */
42
	public function getAgent($id_user)
43
	{
44
		$agent = absences_Agent::getFromIdUser($id_user);
45
		$agent->getRow();
46
		
47
		return $agent;
48
	}
49
	
50
	
51
	/**
52
	 * Set parameters for agent
53
	 * associate rights to agent according to collection
54
	 * if the agent does not exists, il will be created
55
	 * 
56
	 * @param	int		$id_user
57
	 * @param	int		$id_collection
58
	 * @param	int		$id_sa				Approval scheme
59
	 * @param	int		$id_sa_cet			Optionnal approval scheme for time saving account 
60
	 * @param	int		$id_sa_recover		Optionnal approval scheme for work period recovery
61
	 * 
62
	 * @throws Exception
63
	 * 
64
	 */
65
	public function setAgent($id_user, $id_collection, $id_sa, $id_sa_cet = 0, $id_sa_recover = 0)
66
	{
67
		require_once dirname(__FILE__).'/vacincl.php';
68
		
69
		absences_setAgentInfos($id_user,  $id_collection, $id_sa, $id_sa_cet, $id_sa_recover);
70
		absences_setCollectionRights($id_user, $id_collection);
71
	}
72
	
73
	
74
75
	
76
	
77
	
78
	/**
79
	 * Remove agent and requests associted with it
80
	 */
81
	public function deleteAgent($id_user)
82
	{
83
		$agent = absences_Agent::getFromIdUser($id_user);
84
		$agent->delete();
85
	}
86
	
87
	
88
	/**
89
	 * get the list of available collections as array
90
	 * @return array[absences_Collection]
0 ignored issues
show
The doc-type array[absences_Collection] could not be parsed: Expected "]" at position 2, but found "absences_Collection". (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...
91
	 */
92
	public function getCollections()
93
	{
94
		global $babDB;
95
		$return = array();
96
		
97
		$res = $babDB->db_query("select * from absences_collections order by name asc");
98
		while ($arr = $babDB->db_fetch_assoc($res))
99
		{
100
			$id = (int) $arr['id'];
101
			$collection = new absences_Collection();
102
			$collection->setRow($arr);
103
			
104
			$return[$id] = $collection;
105
		}
106
		
107
		return $return;
108
	}
109
	
110
	/**
111
	 * Get the list of rights
112
	 * @return absences_Right[]
113
	 */
114
	public function getRightIterator()
115
	{
116
		require_once dirname(__FILE__).'/right.class.php';
117
		return new absences_RightIterator();
118
	}
119
	
120
}