Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #463 from shadlaws/fix_20130906_master

Fix 20130906 master
  • Loading branch information...
commit 277cd9a98bfc47a95d221eecc6325c8ba7ab24b9 2 parents 04953a4 + 57d12c6
@shadlaws shadlaws authored
View
14 modules/gallery/controllers/admin_theme_options.php
@@ -53,11 +53,17 @@ public function save() {
module::set_var("gallery", "resize_size", $resize_size);
}
- module::set_var("gallery", "header_text", $form->edit_theme->header_text->value);
- module::set_var("gallery", "footer_text", $form->edit_theme->footer_text->value);
module::set_var("gallery", "show_credits", $form->edit_theme->show_credits->value);
- module::set_var("gallery", "favicon_url", $form->edit_theme->favicon_url->value);
- module::set_var("gallery", "apple_touch_icon_url", $form->edit_theme->apple_touch_icon_url->value);
+
+ // Sanitize values that get placed directly in HTML output by theme.
+ module::set_var("gallery", "header_text",
+ html::purify($form->edit_theme->header_text->value));
+ module::set_var("gallery", "footer_text",
+ html::purify($form->edit_theme->footer_text->value));
+ module::set_var("gallery", "favicon_url",
+ html::purify($form->edit_theme->favicon_url->value));
+ module::set_var("gallery", "apple_touch_icon_url",
+ html::purify($form->edit_theme->apple_touch_icon_url->value));
module::event("theme_edit_form_completed", $form);
View
4 modules/gallery/helpers/module.php
@@ -93,6 +93,10 @@ static function available() {
$module_name = basename(dirname($file));
$modules->$module_name =
new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS);
+ foreach ($modules->$module_name as &$value) {
+ $value = html::purify($value);
+ }
+
$m =& $modules->$module_name;
$m->installed = module::is_installed($module_name);
$m->active = module::is_active($module_name);
Please sign in to comment.
Something went wrong with that request. Please try again.