QuickManager+ 1.3.3 with security fix and some other changes too. Zip file and screenshots attached.
Tested with IE8, IE7, Firefox 3, Opera 10, Safari 4.
Changelog:
* Added: A fallback to English if the languages are missing in the Manager/user settings
* Added: Little tweaks with QuickManager action buttons: small hide/show animations and possibilty to close the menu by clicking the MODx logo
* Added: New option for custom buttons: modal = any link opened in a modal box (ColorBox)
* Changed: Custom buttons separator is now || instead of # (reserved for URL anchors)
* Changed: Rounded modal box is back, finally resolved bugs with ColorBox CSS in IE and friendly urls
* Changed: qm-colorbox.css renamed back to colorbox.css
* Fixed: Satinitized possible XSS vulnerabilities
* Removed: OnManagerPageInit plugin event removed
* Removed: IE6 support dropped, QuickManager+ is not tested with IE6 as MODx manager doesn’t offially support IE6
Vulnerable close.php file is changed to this:
<?php
// Get parameters
if (isset($_GET['id'])) $id = intval($_GET['id']);
print <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript">
function getCookie(cookieName)
{
var results = document.cookie.match ( "(^|;) ?" + cookieName + "=([^;]*)(;|$)" );
if (results) return (unescape(results[2]));
else return null;
}
function getUrl()
{
var protocol = window.location.protocol;
var host = window.location.host;
var baseUrl = getCookie("baseUrlQM");
return protocol + "//" + host + baseUrl + "index.php?id={$id}";
}
</script>
</head>
<body onload="javascript: parent.location.href = getUrl();">
</body>
</html>
HTML;
?>
Only $_GET parameter left is "id" which must be an int type: $id = intval($_GET[’id’]);. Can you find any possible security problems from this implementation?