mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17383] Validate php_uname() output too
PHPBB-17383
This commit is contained in:
parent
6d0a965db2
commit
cc4579ee04
1 changed files with 5 additions and 5 deletions
|
@ -1418,12 +1418,8 @@ class smtp_class
|
|||
global $user;
|
||||
|
||||
// Here we try to determine the *real* hostname (reverse DNS entry preferrably)
|
||||
$local_host = $user->host;
|
||||
|
||||
if (function_exists('php_uname'))
|
||||
if (function_exists('php_uname') && !empty($local_host = php_uname('n')))
|
||||
{
|
||||
$local_host = php_uname('n');
|
||||
|
||||
// Able to resolve name to IP
|
||||
if (($addr = @gethostbyname($local_host)) !== $local_host)
|
||||
{
|
||||
|
@ -1434,6 +1430,10 @@ class smtp_class
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$local_host = $user->host;
|
||||
}
|
||||
|
||||
// If we are authenticating through pop-before-smtp, we
|
||||
// have to login ones before we get authenticated
|
||||
|
|
Loading…
Add table
Reference in a new issue