Skip to content

Commit 0ee56d4

Browse files
committed
Security: Remove deprecated file. Last used before 2016 and contains code enabling RCE.
1 parent b939fc8 commit 0ee56d4

File tree

2 files changed

+2
-82
lines changed

2 files changed

+2
-82
lines changed

plugin/vchamilo/js/host_form.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,6 @@ function opencnxpopup(webroot) {
1717
var windowobj = window.open(url, '', options);
1818
}
1919

20-
/**
21-
* Pop-up testing connection with database.
22-
*/
23-
function opendatapathpopup(webroot) {
24-
25-
// Input data.
26-
var datapath = document.getElementById('id_vdatapath').value;
27-
28-
// PHP file linked the pop-up, and name.
29-
var url = webroot + "/plugin/vchamilo/views/manage.testdatapath.php?dataroot=" + escape(datapath);
30-
31-
// Pop-up's options.
32-
var options = "width=500,height=300,toolbar=no,menubar=no,location=no,scrollbars=no,status=no";
33-
34-
// Opening the pop-up (title not working in Firefox).
35-
var windowobj = window.open(url, '', options);
36-
// Needed to be valid in IE.
37-
// windowobj.document.title = vchamilo_testdatapath;
38-
}
39-
4020
/**
4121
* Activates/desactivates services selection.
4222
*/
Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,3 @@
11
<?php
2-
/* For licensing terms, see /license.txt */
3-
4-
/**
5-
* Tests presence of course directories.
6-
*
7-
* @package vchamilo
8-
* @category plugin
9-
*
10-
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
11-
*/
12-
13-
// Loading configuration.
14-
require_once __DIR__.'/../../../main/inc/global.inc.php';
15-
16-
api_protect_admin_script();
17-
18-
$plugin = VChamiloPlugin::create();
19-
20-
// Retrieve parameters for database connection test.
21-
$dataroot = $_REQUEST['dataroot'];
22-
23-
$absalternatecourse = Virtual::getConfig('vchamilo', 'course_real_root');
24-
if (!empty($absalternatecourse)) {
25-
// this is the relocated case
26-
$coursedir = str_replace('//', '/', $absalternatecourse.'/'.$dataroot);
27-
} else {
28-
// this is the standard local case
29-
$coursedir = api_get_path(SYS_PATH).$dataroot;
30-
}
31-
32-
if (is_dir($coursedir)) {
33-
$DIR = opendir($coursedir);
34-
$cpt = 0;
35-
$hasfiles = false;
36-
while (($file = readdir($DIR)) && !$hasfiles) {
37-
if (!preg_match("/^\\./", $file)) {
38-
$hasfiles = true;
39-
}
40-
}
41-
closedir($DIR);
42-
43-
if ($hasfiles) {
44-
echo '<div class="error">'.$plugin->get_lang('datapathnotavailable').'</div>';
45-
} else {
46-
echo '<div class="success">'.$plugin->get_lang('datapathavailable').'</div>';
47-
}
48-
echo stripslashes($coursedir);
49-
} else {
50-
if (@mkdir($coursedir, 02777, true)) {
51-
echo '<div class="success">'.$plugin->get_lang('datapathcreated').'</div>';
52-
} else {
53-
echo '<div class="error">'.$plugin->get_lang('couldnotcreatedataroot').'</div>';
54-
}
55-
echo stripslashes($coursedir);
56-
}
57-
58-
echo "</p>";
59-
60-
$closestr = $plugin->get_lang('closewindow');
61-
echo "<center>";
62-
echo "<input class='btn' type=\"button\" name=\"close\" value=\"$closestr\" onclick=\"self.close();\" />";
63-
echo "</center>";
2+
// Deprecated and vulnerable. Blanked as substitute to removal due to minor version update method.
3+
exit;

0 commit comments

Comments
 (0)