Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-34240 - google plugins: switch to PARAM_RAW_TRIMMED

This ensures the client credentials which are entered are trimmed
as users are finding problems with bad pastes.
  • Loading branch information...
commit 881118184a3e58b28b6daccee8eda44988121a77 1 parent f2867a8
@danpoltawski danpoltawski authored
View
2  portfolio/googledocs/lib.php
@@ -108,7 +108,9 @@ public static function admin_config_form(&$mform) {
$mform->addElement('static', null, '', get_string('oauthinfo', 'portfolio_googledocs', $a));
$mform->addElement('text', 'clientid', get_string('clientid', 'portfolio_googledocs'));
+ $mform->setType('clientid', PARAM_RAW_TRIMMED);
$mform->addElement('text', 'secret', get_string('secret', 'portfolio_googledocs'));
+ $mform->setType('secret', PARAM_RAW_TRIMMED);
$strrequired = get_string('required');
$mform->addRule('clientid', $strrequired, 'required', null, 'client');
View
2  portfolio/picasa/lib.php
@@ -108,7 +108,9 @@ public static function admin_config_form(&$mform) {
$mform->addElement('static', null, '', get_string('oauthinfo', 'portfolio_picasa', $a));
$mform->addElement('text', 'clientid', get_string('clientid', 'portfolio_picasa'));
+ $mform->setType('clientid', PARAM_RAW_TRIMMED);
$mform->addElement('text', 'secret', get_string('secret', 'portfolio_picasa'));
+ $mform->setType('secret', PARAM_RAW_TRIMMED);
$strrequired = get_string('required');
$mform->addRule('clientid', $strrequired, 'required', null, 'client');
View
2  repository/googledocs/lib.php
@@ -119,7 +119,9 @@ public static function type_config_form($mform, $classname = 'repository') {
parent::type_config_form($mform);
$mform->addElement('text', 'clientid', get_string('clientid', 'repository_googledocs'));
+ $mform->setType('clientid', PARAM_RAW_TRIMMED);
$mform->addElement('text', 'secret', get_string('secret', 'repository_googledocs'));
+ $mform->setType('secret', PARAM_RAW_TRIMMED);
$strrequired = get_string('required');
$mform->addRule('clientid', $strrequired, 'required', null, 'client');
View
2  repository/picasa/lib.php
@@ -121,7 +121,9 @@ public static function type_config_form($mform, $classname = 'repository') {
parent::type_config_form($mform);
$mform->addElement('text', 'clientid', get_string('clientid', 'repository_picasa'));
+ $mform->setType('clientid', PARAM_RAW_TRIMMED);
$mform->addElement('text', 'secret', get_string('secret', 'repository_picasa'));
+ $mform->setType('secret', PARAM_RAW_TRIMMED);
$strrequired = get_string('required');
$mform->addRule('clientid', $strrequired, 'required', null, 'client');
Please sign in to comment.
Something went wrong with that request. Please try again.