Project

General

Profile

Bug #19998 » bug_10212_regression_v1.diff

Administrator Admin, 2009-02-17 21:13

View differences:

typo3/sysext/install/mod/class.tx_install_ajax.php (working copy)
case 'encryptionKey':
default:
$this->content = $this->createEncryptionKey();
$this->addTempContentHttpHeaders();
break;
}
}
......
* @return void
*/
function printContent() {
if (!headers_sent()) {
header('Content-Length: '.strlen($this->content));
}
echo $this->content;
}
......
* @return string
*/
function createEncryptionKey($keyLength = 96) {
if (!headers_sent()) {
header("Content-type: text/plain");
}
$bytes = t3lib_div::generateRandomBytes($keyLength);
return substr(bin2hex($bytes), -96);
}
/**
* Sends cache control headers that prevent caching in user agents.
*
*/
function addTempContentHttpHeaders() {
if (!headers_sent()) {
// see RFC 2616
// see Microsoft Knowledge Base #234067
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header('Expires: -1');
}
}
}
// Make instance:
(3-3/5)