Issue Details (XML | Word | Printable)

Key: MDL-15716
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Petr Skoda
Reporter: Iñaki Arenaza
Votes: 2
Watchers: 5
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Tighten dataroot security checks and warn the administrator 'loudly'

Created: 20/Jul/08 04:57 AM   Updated: 21/Oct/08 09:01 PM
Return to search
Component/s: Administration, Installation, Security Alert
Affects Version/s: 1.6.7, 1.7.5, 1.8.6, 1.9.2
Fix Version/s: 1.9.3

File Attachments: 1. Text File public_dataroot_stable19_8.patch (15 kB)
2. Text File tighten-dataroot-security-checks-16-v3.diff (10 kB)
3. Text File tighten-dataroot-security-checks-17-v3.diff (10 kB)
4. Text File tighten-dataroot-security-checks-18-v3.diff (10 kB)
5. Text File tighten-dataroot-security-checks-19-v3.diff (10 kB)
6. Text File tighten-dataroot-security-checks-head-v3.diff (10 kB)

Image Attachments:

1. admin_block.png
(19 kB)

2. admin_index.png
(64 kB)

3. install.png
(24 kB)

Participants: Dan Poltawski, Howard Miller, Iñaki Arenaza, Martin Dougiamas, Petr Skoda and Tim Hunt
Security Level: None
QA Assignee: Nicolas Connault
Resolved date: 21/Aug/08
Affected Branches: MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
The attached patch adds additional checks for the moodledata directory during early installation phases (much earlier than the current check inside admin/index.php), uses stronger warning messages, lets the user click on a link to actually check whether the moodle data directory is accessible from the web or not (which is far easier than trying to check it from the server itself, as it is quite complicated and depend on a lot of configuration factors) and refuses to continue the installation if the moodledata directory appears to be accesible, unless the user explicitly confirms that s/he has verified the directory is not accesible. See the attached image (called install.png) to view all the details mentionned above.

In addition to it, the current check inside admin/index.php is extended to visually notify the admin about the potential problem with moodledata, as it may happen that moodle has been installed with some automated installer that completely hides the installation process, including the warnings and the confirmation checkbox (fantastico is an example of this). So the patchs adds a visual notification about the potential problem to the administration block notifications area (see attached image called admin_block.png). When you click on it, it displays a stronger warning than the current one, lets the administration click on a link to check the moodledata directory accessibility from the web and offers a button to remove the warning (both from the administration block, and the admin notifications page).

Given that there are thousands of Moodle install all over the world with their moodledata directory open to anyone, and that having access to moodledata basically means you can do whatever you want with that moodle install (you can steal the admin user session, for example), I think it's really important to add this check & visual notification to help those people configure their sites correctly.

I'm attaching patches for 1.5, 1.6, 1.7. 1.8, 1.9 and HEAD current as of today.

Saludos. Iñaki.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda committed 9 files to 'Moodle CVS' - 21/Aug/08 11:29 PM
MDL-15716 Tightened dataroot security checks and and 'loud' administrator warning
MODIFY blocks/admin_tree/block_admin_tree.php   Rev. 1.37    (+6 -1 lines)
MODIFY theme/standard/styles_layout.css   Rev. 1.595    (+2 -0 lines)
MODIFY install/stringnames.txt   Rev. 1.16    (+1 -0 lines)
MODIFY lang/en_utf8/install.php   Rev. 1.26    (+4 -3 lines)
MODIFY admin/index.php   Rev. 1.336    (+13 -4 lines)
MODIFY theme/standard/styles_color.css   Rev. 1.172    (+8 -0 lines)
MODIFY install.php   Rev. 1.107    (+5 -1 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.221    (+3 -1 lines)
MODIFY lib/adminlib.php   Rev. 1.243    (+105 -5 lines)
Petr Skoda committed 9 files to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 21/Aug/08 11:31 PM
MDL-15716 Tightened dataroot security checks and and 'loud' administrator warning; backported from HEAD
MODIFY theme/standard/styles_color.css   Rev. 1.149.2.17    (+8 -0 lines)
MODIFY blocks/admin_tree/block_admin_tree.php   Rev. 1.28.2.9    (+6 -1 lines)
MODIFY install.php   Rev. 1.80.2.15    (+5 -2 lines)
MODIFY install/stringnames.txt   Rev. 1.3.2.9    (+1 -0 lines)
MODIFY admin/index.php   Rev. 1.286.2.23    (+13 -4 lines)
MODIFY lang/en_utf8/install.php   Rev. 1.15.2.3    (+4 -3 lines)
MODIFY lang/en_utf8/admin.php   Rev. 1.154.2.55    (+3 -1 lines)
MODIFY theme/standard/styles_layout.css   Rev. 1.516.2.60    (+2 -0 lines)
MODIFY lib/adminlib.php   Rev. 1.153.2.53    (+106 -5 lines)
Mitsuhiro Yoshida committed 4 files to 'Lang CVS' - 22/Aug/08 08:26 AM
MDL-15716 Translated new strings for dataroot security checks.
MDL-13431 Translated new strings for SCORM API debugging tool.
MODIFY ja_utf8/install.php   Rev. 1.40    (+6 -5 lines)
MODIFY ja_utf8/README   Rev. 1.793    (+1 -1 lines)
MODIFY ja_utf8/admin.php   Rev. 1.293    (+13 -11 lines)
MODIFY ja_utf8/scorm.php   Rev. 1.33    (+3 -1 lines)
martignoni committed 2 files to 'Lang CVS' - 23/Aug/08 12:26 AM
MDL-15716 security strings translated
MODIFY fr_utf8/admin.php   Rev. 1.288    (+3 -2 lines)
MODIFY fr_utf8/install.php   Rev. 1.32    (+3 -2 lines)