php8.0 버전 호환 코드 적용 및 PHP 끝 태그 삭제 일괄적용
This commit is contained in:
@ -21,7 +21,7 @@ class Hybrid_Auth {
|
||||
* Configuration array
|
||||
* @var array
|
||||
*/
|
||||
public static $config = array();
|
||||
public static $config = array('providers'=>null);
|
||||
|
||||
/**
|
||||
* Auth cache
|
||||
@ -295,7 +295,7 @@ class Hybrid_Auth {
|
||||
public static function getConnectedProviders() {
|
||||
$idps = array();
|
||||
|
||||
foreach (Hybrid_Auth::$config["providers"] as $idpid => $params) {
|
||||
foreach ((array) Hybrid_Auth::$config["providers"] as $idpid => $params) {
|
||||
if (Hybrid_Auth::isConnectedWith($idpid)) {
|
||||
$idps[] = $idpid;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ abstract class OAuthSignatureMethod {
|
||||
// Avoid a timing leak with a (hopefully) time insensitive compare
|
||||
$result = 0;
|
||||
for ($i = 0; $i < strlen($signature); $i++) {
|
||||
$result |= ord($built{$i}) ^ ord($signature{$i});
|
||||
$result |= ord($built[$i]) ^ ord($signature[$i]);
|
||||
}
|
||||
|
||||
return $result == 0;
|
||||
|
||||
@ -4,5 +4,4 @@ include_once('../../common.php');
|
||||
// 커뮤니티 사용여부
|
||||
if(defined('G5_COMMUNITY_USE') && G5_COMMUNITY_USE === false) {
|
||||
define('_SHOP_', true);
|
||||
}
|
||||
?>
|
||||
}
|
||||
@ -6,7 +6,7 @@ if (!defined('_GNUBOARD_')) exit;
|
||||
<meta name="robots" content="NOINDEX, NOFOLLOW">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=yes">
|
||||
<title>소셜 로그인 - <?php echo $provider; ?></title>
|
||||
<title>소셜 로그인 - <?php echo isset($provider) ? $provider : ''; ?></title>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
||||
<style>
|
||||
@ -28,7 +28,7 @@ if (!defined('_GNUBOARD_')) exit;
|
||||
</head>
|
||||
<body>
|
||||
<div class="error-container">
|
||||
<h4>Error : <?php echo $code; ?></h4>
|
||||
<h4>Error : <?php echo isset($code) ? $code : ''; ?></h4>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
|
||||
<span class="sr-only">Error:</span>
|
||||
@ -64,5 +64,4 @@ if (!defined('_GNUBOARD_')) exit;
|
||||
</script>
|
||||
</html>
|
||||
<?php
|
||||
die();
|
||||
?>
|
||||
die();
|
||||
@ -86,7 +86,7 @@ function social_login_get_provider_adapter( $provider )
|
||||
include_once G5_SOCIAL_LOGIN_PATH . "/Hybrid/Auth.php";
|
||||
}
|
||||
|
||||
if( ! is_object($g5['hybrid_auth']) ){
|
||||
if( ! (isset($g5['hybrid_auth']) && is_object($g5['hybrid_auth'])) ){
|
||||
$setting = social_build_provider_config($provider);
|
||||
$g5['hybrid_auth'] = new Hybrid_Auth( $setting );
|
||||
}
|
||||
@ -121,7 +121,7 @@ function social_before_join_check($url=''){
|
||||
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( $row['provider'] ){
|
||||
if( isset($row['provider']) && $row['provider'] ){
|
||||
$is_exist = true;
|
||||
|
||||
$time = time() - (86400 * (int) G5_SOCIAL_DELETE_DAY);
|
||||
@ -359,7 +359,7 @@ function social_extends_get_keys($provider){
|
||||
);
|
||||
}
|
||||
|
||||
return $r[$provider];
|
||||
return isset($r[$provider]) ? $r[$provider] : array();
|
||||
}
|
||||
|
||||
function social_escape_request($request){
|
||||
@ -494,7 +494,7 @@ function social_check_login_before($p_service=''){
|
||||
{
|
||||
$get_error = social_get_error_msg( $e->getCode() );
|
||||
|
||||
if( is_object( $adapter ) ){
|
||||
if( isset($adapter) && is_object( $adapter ) ){
|
||||
$adapter->logout();
|
||||
}
|
||||
|
||||
@ -1029,7 +1029,7 @@ function social_get_nonce($key=''){
|
||||
|
||||
$setting = social_build_provider_config($key);
|
||||
try{
|
||||
return sha1($setting['providers'][$key]['secret']);
|
||||
return isset($setting['providers'][$key]['secret']) ? sha1($setting['providers'][$key]['secret']) : '';
|
||||
} catch(Exception $e) {
|
||||
return '';
|
||||
}
|
||||
@ -1060,5 +1060,4 @@ function social_nonce_is_valid( $nonce , $action = '' , $user='' , $provider = '
|
||||
function social_nonce_generate_hash( $action='' , $user='', $provider = '' ){
|
||||
$i = ceil( time() / ( social_get_nonce('d') / 2 ) );
|
||||
return md5( $i . $action . $user . social_get_nonce($provider) );
|
||||
}
|
||||
?>
|
||||
}
|
||||
@ -27,6 +27,4 @@ class G5_Hybrid_Authentication {
|
||||
G5_Hybrid_Endpoint::process();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
}
|
||||
@ -28,5 +28,4 @@ class G5_Hybrid_Endpoint extends Hybrid_Endpoint
|
||||
include_once(G5_SOCIAL_LOGIN_PATH.'/error.php');
|
||||
die();
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
@ -64,5 +64,4 @@ if (!defined('_GNUBOARD_')) exit;
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
die();
|
||||
?>
|
||||
die();
|
||||
@ -239,6 +239,4 @@ $social_providers_config = array(
|
||||
|
||||
"cat" => "misc",
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
);
|
||||
@ -40,5 +40,4 @@ if( isset( $_REQUEST["redirect_to_idp"] ) ){
|
||||
} else {
|
||||
social_login_session_clear(1);
|
||||
social_return_from_provider_page( $provider_name, '', '', '', '' );
|
||||
}
|
||||
?>
|
||||
}
|
||||
@ -46,8 +46,8 @@ $login_action_url = G5_HTTPS_BBS_URL."/login_check.php";
|
||||
$req_nick = !isset($member['mb_nick_date']) || (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", G5_SERVER_TIME - ($config['cf_nick_modify'] * 86400)));
|
||||
$required = ($w=='') ? 'required' : '';
|
||||
$readonly = ($w=='u') ? 'readonly' : '';
|
||||
$login_url = '';
|
||||
|
||||
include_once(get_social_skin_path().'/social_register_member.skin.php');
|
||||
|
||||
include_once(G5_BBS_PATH.'/_tail.php');
|
||||
?>
|
||||
include_once(G5_BBS_PATH.'/_tail.php');
|
||||
@ -21,12 +21,12 @@ if( ! $user_profile ){
|
||||
$is_exists_social_account = social_before_join_check(G5_URL);
|
||||
|
||||
$sm_id = $user_profile->sid;
|
||||
$mb_id = trim($_POST['mb_id']);
|
||||
$mb_password = trim($_POST['mb_password']);
|
||||
$mb_password_re = trim($_POST['mb_password_re']);
|
||||
$mb_nick = trim(strip_tags($_POST['mb_nick']));
|
||||
$mb_email = trim($_POST['mb_email']);
|
||||
$mb_name = clean_xss_tags(trim(strip_tags($_POST['mb_name'])));
|
||||
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
|
||||
$mb_password = isset($_POST['mb_password']) ? trim($_POST['mb_password']) : '';
|
||||
$mb_password_re = isset($_POST['mb_password_re']) ? trim($_POST['mb_password_re']) : '';
|
||||
$mb_nick = isset($_POST['mb_nick']) ? trim(strip_tags($_POST['mb_nick'])) : '';
|
||||
$mb_email = isset($_POST['mb_email']) ? trim($_POST['mb_email']) : '';
|
||||
$mb_name = isset($_POST['mb_name']) ? clean_xss_tags(trim(strip_tags($_POST['mb_name']))) : '';
|
||||
$mb_email = get_email_address($mb_email);
|
||||
|
||||
// 이름, 닉네임에 utf-8 이외의 문자가 포함됐다면 오류
|
||||
@ -237,5 +237,4 @@ if($result) {
|
||||
|
||||
alert('회원 가입 오류!', G5_URL );
|
||||
|
||||
}
|
||||
?>
|
||||
}
|
||||
@ -44,5 +44,4 @@ if( $row['mp_no'] ){
|
||||
|
||||
die("{\"error\":\"잘못된 요청입니다.\"}");
|
||||
|
||||
}
|
||||
?>
|
||||
}
|
||||
Reference in New Issue
Block a user