Skip to content

Commit

Permalink
MDL-28279 remove flash client version blocking
Browse files Browse the repository at this point in the history
Everybody is responsible for upgrades of Flash, there is no excuse any more.
  • Loading branch information
skodak committed Jul 10, 2011
1 parent f6f6138 commit cdbd371
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 129 deletions.
1 change: 0 additions & 1 deletion admin/settings/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
$temp->add(new admin_setting_configcheckbox('loginhttps', get_string('loginhttps', 'admin'), get_string('configloginhttps', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('cookiesecure', get_string('cookiesecure', 'admin'), get_string('configcookiesecure', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('cookiehttponly', get_string('cookiehttponly', 'admin'), get_string('configcookiehttponly', 'admin'), 0));
$temp->add(new admin_setting_configtext('excludeoldflashclients', get_string('excludeoldflashclients', 'admin'), get_string('configexcludeoldflashclients', 'admin'), '10.0.12', PARAM_TEXT));
$ADMIN->add('security', $temp);


Expand Down
2 changes: 0 additions & 2 deletions lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@
$string['configenablewebservices'] = 'Web services enable other systems to log in to this Moodle and perform operations. For extra security this feature should be disabled unless you are really using it.';
$string['configenablewsdocumentation'] = 'Enable auto-generation of web services documentation. A user can access to his own documentation on his security keys page {$a}. It displays the documentation for the enabled protocols only.';
$string['configerrorlevel'] = 'Choose the amount of PHP warnings that you want to be displayed. Normal is usually the best choice.';
$string['configexcludeoldflashclients'] = 'Some versions of the Adobe Flash plugin are known to be vulnerable to attacks from malicious Flash content. You can specify a minimum supported version here, and Moodle will not show Flash files to users with lower versions. Instead they will see an alternate Flash file telling them how to upgrade. Leave this empty to disable all checks.';
$string['configextendedusernamechars'] = 'Enable this setting to allow students to use any characters in their usernames (note this does not affect their actual names). The default is "false" which restricts usernames to be alphanumeric lowercase characters, underscore (_), hyphen (-), period (.) or at symbol (@).';
$string['configextramemorylimit'] = 'Some scripts like search, backup/restore or cron require more memory. Set higher values for large sites.';
$string['configextrauserselectorfields'] = 'Select which fields are searched and displayed, in addition to full names, when selecting users, for example when assigning roles or when adding users to a group. For security reasons, it is recommended that the username field is NOT selected.';
Expand Down Expand Up @@ -514,7 +513,6 @@
$string['errorwithsettings'] = 'Some settings were not changed due to an error.';
$string['everyonewhocan'] = 'Everyone who can \'{$a}\'';
$string['exceptions'] = 'exceptions';
$string['excludeoldflashclients'] = 'Required Flash player version';
$string['experimental'] = 'Experimental';
$string['experimentalsettings'] = 'Experimental settings';
$string['extendedusernamechars'] = 'Allow extended characters in usernames';
Expand Down
4 changes: 0 additions & 4 deletions lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,6 @@
$string['firstaccess'] = 'First access';
$string['firstname'] = 'First name';
$string['firsttime'] = 'Is this your first time here?';
$string['flashlinkmessage'] = 'Please upgrade your Flash player now:';
$string['flashupgrademessage'] = 'The Flash plugin is required to play this content, but the version you have is too old.
You may need to log out and log in back after upgrade.';
$string['folder'] = 'Folder';
$string['folderclosed'] = 'Closed folder';
$string['folderopened'] = 'Opened folder';
Expand Down
30 changes: 0 additions & 30 deletions lib/flashdetect/flashdetect.js

This file was deleted.

Binary file removed lib/flashdetect/flashupgrade.fla
Binary file not shown.
Binary file removed lib/flashdetect/flashupgrade.swf
Binary file not shown.
30 changes: 0 additions & 30 deletions lib/flashdetect/message.php

This file was deleted.

1 change: 0 additions & 1 deletion lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -7035,7 +7035,6 @@ function get_core_subsystems() {
'filepicker' => NULL,
'files' => 'files',
'filters' => NULL,
'flashdetect' => NULL,
'fonts' => NULL,
'form' => 'lib/form',
'grades' => 'grade',
Expand Down
6 changes: 0 additions & 6 deletions lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,6 @@ public function standard_head_html() {
$jsurl = $this->page->theme->javascript_url(false);
$this->page->requires->js($jsurl);

// Perform a browser environment check for the flash version. Should only run once per login session.
if (!NO_MOODLE_COOKIES && isloggedin() && !empty($CFG->excludeoldflashclients) && empty($SESSION->flashversion)) {
$this->page->requires->js('/lib/swfobject/swfobject.js');
$this->page->requires->js_init_call('M.core_flashdetect.init');
}

// Get any HTML from the page_requirements_manager.
$output .= $this->page->requires->get_head_code($this->page, $this);

Expand Down
5 changes: 0 additions & 5 deletions lib/outputrequirementslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,6 @@ protected function find_module($component) {
'requires' => array('base', 'node', 'event', 'node-event-simulate'),
'fullpath' => '/message/module.js');
break;
case 'core_flashdetect':
$module = array('name' => 'core_flashdetect',
'fullpath' => '/lib/flashdetect/flashdetect.js',
'requires' => array('io'));
break;
case 'core_group':
$module = array('name' => 'core_group',
'fullpath' => '/group/module.js',
Expand Down
35 changes: 0 additions & 35 deletions login/environment.php

This file was deleted.

15 changes: 0 additions & 15 deletions pluginfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,6 @@

$fs = get_file_storage();

// If the file is a Flash file and that the user flash player is outdated return a flash upgrader MDL-20841
$mimetype = mimeinfo('type', $args[count($args)-1]);
if (!empty($CFG->excludeoldflashclients) && $mimetype == 'application/x-shockwave-flash'&& !empty($SESSION->flashversion)) {
$userplayerversion = explode('.', $SESSION->flashversion);
$requiredplayerversion = explode('.', $CFG->excludeoldflashclients);
if (($userplayerversion[0] < $requiredplayerversion[0]) ||
($userplayerversion[0] == $requiredplayerversion[0] && $userplayerversion[1] < $requiredplayerversion[1]) ||
($userplayerversion[0] == $requiredplayerversion[0] && $userplayerversion[1] == $requiredplayerversion[1]
&& $userplayerversion[2] < $requiredplayerversion[2])) {
$path = $CFG->dirroot."/lib/flashdetect/flashupgrade.swf"; // Alternate content asking user to upgrade Flash
$filename = "flashupgrade.swf";
send_file($path, $filename, O, 0, false, false, 'application/x-shockwave-flash'); // Do not cache
}
}

// ========================================================================================================================
if ($component === 'blog') {
// Blog file serving
Expand Down

0 comments on commit cdbd371

Please sign in to comment.