Bug #79558 [Com]: gethostbyaddr()'s problem with some characters

From: Date: Wed, 27 May 2020 17:10:09 +0000
Subject: Bug #79558 [Com]: gethostbyaddr()'s problem with some characters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227210@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79558&edit=1 ID: 79558 Comment by: php at mcq8 dot be Reported by: havijoori at protonmail dot com Summary: gethostbyaddr()'s problem with some characters Status: Open Type: Bug Package: *Network Functions Operating System: Linux PHP Version: 7.4.5 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#227210) next »