Bug #79558 [Opn->Nab]: gethostbyaddr()'s problem with some characters
Edit report at https://bugs.php.net/bug.php?id=79558&edit=1
ID: 79558
Updated by: cmb@php.net
Reported by: havijoori at protonmail dot com
Summary: gethostbyaddr()'s problem with some characters
-Status: Open
+Status: Not a bug
Type: Bug
Package: *Network Functions
Operating System: Linux
PHP Version: 7.4.5
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Indeed, that would rather be an upstream issue. FWIW, Windows
also reports "Dr Zhang's desktop.ds.uah.edu".
Previous Comments:
------------------------------------------------------------------------
[2020-05-27 17:10:09] php at mcq8 dot be
This is not a bug in PHP.
It depends on how your system handles invalid domain names.
On alpine your example resolves to "Dr Zhang's desktop.ds.uah.edu" on debian it
returns the ip when it fails to resolve.
You can try and file a bugreport at glibc, but I doubt they will accept requests for domains with
invalid chars.
------------------------------------------------------------------------
[2020-05-02 18:47:47] bugreports at gmail dot com
> Dr\032Zhang's\032desktop.ds.uah.edu.
this is pretty nosense - learn about https://www.punycoder.com/ or show the RFC which is *not* some
draft allowing such chars as hostname
------------------------------------------------------------------------
[2020-05-02 18:40:03] havijoori at protonmail dot com
Description:
------------
gethostbyaddr function does not work properly if the hostname contains some characters.
For example, gethostbyaddr("146.229.226.10") returns 146.229.226.10 but the correct answer
is :
$ dig -x 146.229.226.10 @8.8.8.8 +short
Dr\032Zhang's\032desktop.ds.uah.edu.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79558&edit=1
Thread (4 messages)