Created
January 30, 2014 16:25
-
-
Save pietro/8712454 to your computer and use it in GitHub Desktop.
Horde 3 security patches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Horde/Form/Renderer.php b/lib/Horde/Form/Renderer.php | |
index b7404e4..5db7626 100644 | |
--- a/lib/Horde/Form/Renderer.php | |
+++ b/lib/Horde/Form/Renderer.php | |
@@ -217,7 +217,7 @@ try { | |
} | |
} | |
require_once 'Horde/NLS.php'; | |
- echo '<input type="hidden" name="_formvars" value="' . @htmlspecialchars(serialize($vars), ENT_QUOTES, NLS::getCharset()) . '" />'; | |
+ echo '<input type="hidden" name="_formvars" value="' . htmlspecialchars(json_encode($vars)) . '" />'; | |
} | |
function renderFormActive(&$form, &$vars) | |
diff --git a/lib/Horde/Variables.php b/lib/Horde/Variables.php | |
index 2fc85f3..d792537 100644 | |
--- a/lib/Horde/Variables.php | |
+++ b/lib/Horde/Variables.php | |
@@ -29,7 +29,7 @@ class Variables { | |
$vars = Util::dispelMagicQuotes($_REQUEST); | |
} | |
if (isset($vars['_formvars'])) { | |
- $this->_expectedVariables = @unserialize($vars['_formvars']); | |
+ $this->_expectedVariables = @json_decode($vars['_formvars'], true); | |
unset($vars['_formvars']); | |
} | |
$this->_vars = $vars; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment