img/uberwach/uberwach-button-gruen.gif -text
img/uberwach/uberwach-kamera-gruen.gif -text
inc/.htaccess -text
-inc/.secret/.htaccess -text
inc/autopurge/.htaccess -text
inc/autopurge/purge- -text
inc/autopurge/purge-general.php -text
// Test again
if ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && (getFileHash() != '') && (getMasterSalt() != '') && (getPassScramble() != '')) {
// File hash fas generated so we can also file the secret file... hopefully.
- $hashFile = sprintf("%sinc/.secret/.%s", getPath(), getFileHash());
+ $hashFile = sprintf("%sinc/cache/.%s", getPath(), getFileHash());
if (isFileReadable($hashFile)) {
// Read file
setConfigEntry('secret_key', readFromFile($hashFile));
if (getFileHash() == '') {
// Create filename from hashed random string
$fileHash = sha1(generatePassword(mt_rand(128, 256)));
- $FQFN = sprintf("%sinc/.secret/.%s",
+ $FQFN = sprintf("%sinc/cache/.%s",
getPath(),
$fileHash
);
// Is the file there?
if (isFileReadable($FQFN)) {
- //* DEBUG: */ removeFile($FQFN);
- //* DEBUG: */ $test = hexdec(getSession('u_hash')) / hexdec($secretKey);
- //* DEBUG: */ $test = generateHash(str_replace('.', '', $test));
- //* DEBUG: */ die("Secret-Key: ".$secretKey."<br />Cookie: ".getSession('u_hash')."<br />Test: ".$test);
-
- // Write $fileHash to database
- updateConfiguration('file_hash', $fileHash);
-
- // Generate FQFN for .htaccess file
- $FQFN = sprintf("%sinc/.secret/.htaccess",
- getPath()
- );
-
- // Is the .htaccess file there?
- if (!isFileReadable($FQFN)) {
- // Also create .htaccess file
- writeToFile($FQFN, "Deny from all\n");
- } // END - if
-
// Also update configuration
setConfigEntry('secret_key', $secretKey);