PHP81버전 대응 충돌수정

This commit is contained in:
thisgun
2022-06-13 14:32:14 +09:00
19 changed files with 170 additions and 3690 deletions

View File

@ -1,61 +0,0 @@
{
"name": "phpmailer/phpmailer",
"type": "library",
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"authors": [
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"require": {
"ext-ctype": "*",
"php": ">=5.0.0"
},
"require-dev": {
"doctrine/annotations": "1.2.*",
"jms/serializer": "0.16.*",
"phpdocumentor/phpdocumentor": "2.*",
"phpunit/phpunit": "4.8.*",
"symfony/debug": "2.8.*",
"symfony/filesystem": "2.8.*",
"symfony/translation": "2.8.*",
"symfony/yaml": "2.8.*",
"zendframework/zend-cache": "2.5.1",
"zendframework/zend-config": "2.5.1",
"zendframework/zend-eventmanager": "2.5.1",
"zendframework/zend-filter": "2.5.1",
"zendframework/zend-i18n": "2.5.1",
"zendframework/zend-json": "2.5.1",
"zendframework/zend-math": "2.5.1",
"zendframework/zend-serializer": "2.5.*",
"zendframework/zend-servicemanager": "2.5.*",
"zendframework/zend-stdlib": "2.5.1"
},
"suggest": {
"league/oauth2-google": "Needed for Google XOAUTH2 authentication"
},
"autoload": {
"classmap": [
"class.phpmailer.php",
"class.phpmaileroauth.php",
"class.phpmaileroauthgoogle.php",
"class.smtp.php",
"class.pop3.php",
"extras/EasyPeasyICS.php",
"extras/ntlm_sasl_client.php"
]
},
"license": "LGPL-2.1"
}

File diff suppressed because it is too large Load Diff

View File

@ -274,9 +274,15 @@ function chk_captcha()
return false;
}
if (!isset($_POST['captcha_key'])) return false;
if (!trim($_POST['captcha_key'])) return false;
if ($_POST['captcha_key'] != get_session('ss_captcha_key')) {
$post_captcha_key = (isset($_POST['captcha_key']) && $_POST['captcha_key']) ? trim($_POST['captcha_key']) : '';
if (!trim($post_captcha_key)) return false;
if( $post_captcha_key && function_exists('get_string_encrypt') ){
$ip = md5(sha1($_SERVER['REMOTE_ADDR']));
$post_captcha_key = get_string_encrypt($ip.$post_captcha_key);
}
if ($post_captcha_key != get_session('ss_captcha_key')) {
$_SESSION['ss_captcha_count'] = $captcha_count + 1;
return false;
}

View File

@ -3,6 +3,11 @@ include_once("_common.php");
include_once('captcha.lib.php');
$captcha = new KCAPTCHA();
$captcha->setKeyString(get_session("ss_captcha_key"));
$ss_captcha_key = get_session("ss_captcha_key");
if( $ss_captcha_key && !preg_match('/^[0-9]/', $ss_captcha_key) && function_exists('get_string_decrypt') ){
$ip = md5(sha1($_SERVER['REMOTE_ADDR']));
$ss_captcha_key = str_replace($ip, '', get_string_decrypt($ss_captcha_key));
}
$captcha->setKeyString($ss_captcha_key);
$captcha->getKeyString();
$captcha->image();

View File

@ -8,6 +8,10 @@ function make_mp3()
$number = get_session("ss_captcha_key");
if ($number == "") return;
$ip = md5(sha1($_SERVER['REMOTE_ADDR']));
if( $number && function_exists('get_string_decrypt') ){
$number = str_replace($ip, '', get_string_decrypt($number));
}
if ($number == get_session("ss_captcha_save")) return;
$mp3s = array();
@ -16,7 +20,6 @@ function make_mp3()
$mp3s[] = $file;
}
$ip = md5(sha1($_SERVER['REMOTE_ADDR']));
$mp3_file = 'cache/kcaptcha-'.$ip.'_'.G5_SERVER_TIME.'.mp3';
$contents = '';
@ -35,6 +38,9 @@ function make_mp3()
}
}
if( $number && function_exists('get_string_encrypt') ){
$number = get_string_encrypt($ip.$number);
}
set_session("ss_captcha_save", $number);
return G5_DATA_URL.'/'.$mp3_file;

View File

@ -9,5 +9,10 @@ if ($count >= 5) { // 설정값 이상이면 자동등록방지 입력 문자가
echo false;
} else {
set_session("ss_captcha_count", $count + 1);
if( $captcha_key && function_exists('get_string_encrypt') ){
$ip = md5(sha1($_SERVER['REMOTE_ADDR']));
$captcha_key = get_string_encrypt($ip.$captcha_key);
}
echo (get_session("ss_captcha_key") === $captcha_key) ? true : false;
}

View File

@ -11,6 +11,11 @@ while(true){
if(!preg_match('/cp|cb|ck|c6|c9|rn|rm|mm|co|do|cl|db|qp|qb|dp|ww/', $keystring)) break;
}
if( $keystring && function_exists('get_string_encrypt') ){
$ip = md5(sha1($_SERVER['REMOTE_ADDR']));
$keystring = get_string_encrypt($ip.$keystring);
}
set_session("ss_captcha_count", 0);
set_session("ss_captcha_key", $keystring);
$captcha = new KCAPTCHA();

View File

@ -11,6 +11,7 @@ require_once realpath(dirname(__FILE__)) . "/StorageInterface.php";
* HybridAuth storage manager
*/
class Hybrid_Storage implements Hybrid_Storage_Interface {
public static $stores = array();
/**
* Constructor
@ -37,11 +38,21 @@ class Hybrid_Storage implements Hybrid_Storage_Interface {
$key = strtolower($key);
if ($value) {
$_SESSION["HA::CONFIG"][$key] = serialize($value);
$serialize_value = function_exists('get_string_encrypt') ? get_string_encrypt(serialize($value)) : serialize($value);
if( in_array($key, array('php_session_id', 'config')) ){
$this->stores[$key] = $serialize_value;
} else {
$_SESSION["HA::CONFIG"][$key] = $serialize_value;
}
} elseif (isset($this->stores[$key])) {
$unserialize_value = function_exists('get_string_decrypt') ? unserialize(get_string_decrypt($this->stores[$key])) : unserialize($this->stores[$key]);
return $unserialize_value;
} elseif (isset($_SESSION["HA::CONFIG"][$key])) {
return unserialize($_SESSION["HA::CONFIG"][$key]);
$unserialize_value = function_exists('get_string_decrypt') ? unserialize(get_string_decrypt($_SESSION["HA::CONFIG"][$key])) : unserialize($_SESSION["HA::CONFIG"][$key]);
return $unserialize_value;
}
return null;
}
@ -55,7 +66,8 @@ class Hybrid_Storage implements Hybrid_Storage_Interface {
$key = strtolower($key);
if (isset($_SESSION["HA::STORE"], $_SESSION["HA::STORE"][$key])) {
return unserialize($_SESSION["HA::STORE"][$key]);
$unserialize_value = function_exists('get_string_decrypt') ? unserialize(get_string_decrypt($_SESSION["HA::STORE"][$key])) : unserialize($_SESSION["HA::STORE"][$key]);
return $unserialize_value;
}
return null;
@ -70,7 +82,8 @@ class Hybrid_Storage implements Hybrid_Storage_Interface {
*/
public function set($key, $value) {
$key = strtolower($key);
$_SESSION["HA::STORE"][$key] = serialize($value);
$serialize_value = function_exists('get_string_encrypt') ? get_string_encrypt(serialize($value)) : serialize($value);
$_SESSION["HA::STORE"][$key] = $serialize_value;
}
/**
@ -138,4 +151,4 @@ class Hybrid_Storage implements Hybrid_Storage_Interface {
$_SESSION["HA::STORE"] = unserialize($sessiondata);
}
}
}

View File

@ -391,7 +391,8 @@ function social_session_exists_check(){
}
if( $provider_name && isset($_SESSION['HA::STORE']['hauth_session.'.strtolower($provider_name).'.is_logged_in']) && !empty($_SESSION['sl_userprofile'][$provider_name]) ){
return json_decode($_SESSION['sl_userprofile'][$provider_name]);
$decode_value = function_exists('get_string_decrypt') ? json_decode(get_string_decrypt($_SESSION['sl_userprofile'][$provider_name])) : json_decode($_SESSION['sl_userprofile'][$provider_name]);
return $decode_value;
}
return false;
@ -485,8 +486,9 @@ function social_check_login_before($p_service=''){
$_SESSION['sl_userprofile'] = array();
}
if( ! $is_member ){
$_SESSION['sl_userprofile'][$provider_name] = json_encode( $user_profile );
if( ! $is_member ){
$encode_value = function_exists('get_string_encrypt') ? get_string_encrypt(json_encode($user_profile)) : json_encode($user_profile);
$_SESSION['sl_userprofile'][$provider_name] = $encode_value;
}
}

View File

@ -3,6 +3,40 @@ if (!defined('_GNUBOARD_')) exit;
class G5_Hybrid_Endpoint extends Hybrid_Endpoint
{
protected function authInit() {
if (!$this->initDone) {
$this->initDone = true;
// Init Hybrid_Auth
try {
if (!class_exists("Hybrid_Storage", false)) {
require_once realpath(dirname(dirname(__FILE__))). "/Hybrid/Storage.php";
}
if (!class_exists("Hybrid_Exception", false)) {
require_once realpath(dirname(dirname(__FILE__))). "/Hybrid/Exception.php";
}
if (!class_exists("Hybrid_Logger", false)) {
require_once realpath(dirname(dirname(__FILE__))). "/Hybrid/Logger.php";
}
$storage = new Hybrid_Storage();
$provider_id = ucfirst(trim(strip_tags($this->request["hauth_start"])));
if(!$provider_id) $provider_id = ucfirst(trim(strip_tags($this->request["hauth_done"])));
$storage->config("CONFIG", social_build_provider_config($provider_id));
// Check if Hybrid_Auth session already exist
if (!$storage->config("CONFIG")) {
$this->dieError("CONFIG FAILED: ", "Unable to get config", array());
}
Hybrid_Auth::initialize($storage->config("CONFIG"));
} catch (Exception $e) {
Hybrid_Logger::error("Endpoint: Error while trying to init Hybrid_Auth: " . $e->getMessage());
$this->dieError("Endpoint Error: ", $e->getMessage(), $e);
}
}
}
protected function processAuthStart(){
try {
parent::processAuthStart();

View File

@ -226,6 +226,7 @@ if($result) {
//바로 로그인 처리
set_session('ss_mb_id', $mb['mb_id']);
if(function_exists('update_auth_session_token')) update_auth_session_token(G5_TIME_YMDHIS);
} else { // 메일인증을 사용한다면
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';