Changeset 754 for branches/1.1dev/lib
- Timestamp:
- Nov 15, 2021 10:58:50 PM (2 years ago)
- Location:
- branches/1.1dev/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1dev/lib/AuthSQL.inc.php
r753 r754 377 377 $remote_ip_is_matched = (isset($_SESSION[$this->_auth_name]['remote_ip']) && $_SESSION[$this->_auth_name]['remote_ip'] == getRemoteAddr() || $user_in_trusted_network); 378 378 } else { 379 logMsg(sprintf('%s%s exempt from remote_ip match.',380 ucfirst($this->_params['auth_name']),381 ($this->getVal('user_id') ? ' ' . $this->getVal('user_id') . ' (' . $this->getVal('username') . ')' : '')382 ), LOG_DEBUG, __FILE__, __LINE__);379 // logMsg(sprintf('%s%s exempt from remote_ip match.', 380 // ucfirst($this->_params['auth_name']), 381 // ($this->getVal('user_id') ? ' ' . $this->getVal('user_id') . ' (' . $this->getVal('username') . ')' : '') 382 // ), LOG_DEBUG, __FILE__, __LINE__); 383 383 $remote_ip_is_matched = true; 384 384 } -
branches/1.1dev/lib/Utilities.inc.php
r753 r754 726 726 } 727 727 728 /* 729 * Generates a base-65-encoded sha512 hash of $string truncated to $length. 730 * 731 * @access public 732 * @param string $string Input string to hash. 733 * @param int $length Length of output hash string. 734 * @return string String of hash. 735 * @author Quinn Comendant <quinn@strangecode.com> 736 * @version 1.0 737 * @since 03 Apr 2016 19:48:49 738 */ 739 function hash64($string, $length=18) 740 { 741 $app =& App::getInstance(); 742 743 return mb_substr(preg_replace('/[^\w]/' . $app->getParam('preg_u'), '', base64_encode(hash('sha512', $string, true))), 0, $length); 744 } 745 728 746 /** 729 747 * Signs a value using md5 and a simple text key. In order for this
Note: See TracChangeset
for help on using the changeset viewer.