patch for php8.x
This commit is contained in:
parent
172e4f39d9
commit
05580f9818
2 changed files with 15 additions and 5 deletions
|
|
@ -475,8 +475,9 @@ if (isset($_REQUEST['url'])) {
|
|||
} else {
|
||||
$url = '';
|
||||
$urlencode = urlencode($_SERVER['REQUEST_URI']);
|
||||
if (G5_DOMAIN) {
|
||||
$p = @parse_url(G5_DOMAIN);
|
||||
if (defined("G5_DOMAIN")) {
|
||||
$p = @parse_url(G5_DOMAIN ?? "");
|
||||
$p['path'] = isset($p['path']) ? $p['path'] : '/';
|
||||
$urlencode = G5_DOMAIN . urldecode(preg_replace("/^" . urlencode($p['path']) . "/", "", $urlencode));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1586,13 +1586,22 @@ function sql_free_result($result)
|
|||
return mysql_free_result($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* MySQL PASSWORD() 함수로 생성된 비밀번호의 hash 값을 반환
|
||||
*
|
||||
* MySQL 버전에 따라 결과가 다르게 나올 수 있음.
|
||||
* MySQL 8.0.11 버전 이상에서는 오류 발생(PASSWORD 함수가 제거됨)으로 사용할 수 없음.
|
||||
*
|
||||
* @deprecated 이 함수는 안전하지 않으므로 사용하지 않는 것을 권장 함
|
||||
* @see get_encrypt_string() and check_password()
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
function sql_password($value)
|
||||
{
|
||||
// mysql 4.0x 이하 버전에서는 password() 함수의 결과가 16bytes
|
||||
// mysql 4.1x 이상 버전에서는 password() 함수의 결과가 41bytes
|
||||
$row = sql_fetch(" select password('$value') as pass ");
|
||||
|
||||
$row = sql_fetch(" SELECT password('$value') as pass ");
|
||||
return $row['pass'];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue