]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/loader.php
Don't abuse isValidSqlLink() for checking results
[mailer.git] / inc / modules / loader.php
index b3395fa389c8fa4f82982332c506967a2009f5aa..2216d8ac012dd843c40fa5eeeb68f1471291504d 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -41,12 +41,18 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Is an URL specified?
-if ((isGetRequestElementSet('url')) && (isGetRequestElementSet('hash'))) {
+if ((isGetRequestElementSet('url')) && (isGetRequestElementSet('hash')) && (isGetRequestElementSet('salt'))) {
        // Decode URL
        $decodedUrl = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url')))));
 
+       // Debug message
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'decodedUrl=' . $decodedUrl . ',hash=' . getRequestElement('hash'));
+
        // Generate hash for comparing it
-       $hash = encodeHashForCookie(generateHash($decodedUrl, getRequestElement('hash')));
+       $hash = encodeHashForCookie(generateHash($decodedUrl . getSiteKey() . getDateKey(), getRequestElement('salt')));
+
+       // Debug message
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'decodedUrl=' . $decodedUrl . ',hash=' . $hash);
 
        // Validate the URL and hash
        if ($hash != getRequestElement('hash')) {