From: Roland Häder Date: Thu, 1 Jul 2010 16:49:15 +0000 (+0000) Subject: Removed deprecated code, inc/.secret/ is now obsolete and its files are located in... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d5541e98aa3144d91c7151e5803e8d31e944242e;p=mailer.git Removed deprecated code, inc/.secret/ is now obsolete and its files are located in inc/cache/. Please move all files from inc/.secret/ to inc/cache/ --- diff --git a/.gitattributes b/.gitattributes index c14e589a67..8f4702e716 100644 --- a/.gitattributes +++ b/.gitattributes @@ -89,7 +89,6 @@ img/politician-stop/politiker-stopp_150x24.png -text 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 diff --git a/inc/.secret/.htaccess b/inc/.secret/.htaccess deleted file mode 100644 index 3a42882788..0000000000 --- a/inc/.secret/.htaccess +++ /dev/null @@ -1 +0,0 @@ -Deny from all diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 43d87e3bad..138f723c1d 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -772,7 +772,7 @@ INDEX (`ip`) // 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)); diff --git a/inc/gen_sql_patches.php b/inc/gen_sql_patches.php index 4853da16b7..1173c4b3b2 100644 --- a/inc/gen_sql_patches.php +++ b/inc/gen_sql_patches.php @@ -70,7 +70,7 @@ if (getMasterSalt() == '') { 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 ); @@ -83,25 +83,6 @@ if (getFileHash() == '') { // 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."
Cookie: ".getSession('u_hash')."
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);