UseBB Community

The official board for UseBB help and discussion

UseBB Community » Bug Reports » [INVALID] RBL does not work correctly.

[INVALID] RBL does not work correctly.

Page: 1

Author Post
Member
Registered: May 2005
Posts: 26
Location: Japan
In my environment, many hosts are vainly in match with a blacklist.

I investigated, checkdnsrr() seems not to work correctly.

**** OK

$ php -r 'var_dump(checkdnsrr("4.13.113.203.list.dsbl.org","A"));'
bool(true)
$ host 4.13.113.203.list.dsbl.org
4.13.113.203.list.dsbl.org has address 127.0.0.2


**** Bad

$ php -r 'var_dump(checkdnsrr("100.1.168.192.list.dsbl.org","A"));'
bool(true)
$ host 100.1.168.192.list.dsbl.org
Host 100.1.168.192.list.dsbl.org not found: 3(NXDOMAIN)


checndnsrr() returns TRUE. However, A record cannot actually be referred to from DNS.

I checked at the source of PHP(ext/standard/dns.c).
The return value of res_search() is an unexpected value.


I made the patch using gethostbyname() instead of checkdnsrr().
Moreover, gethostbyname_win() was also made.

http://oss.poyo.jp/pub/contribute/usebb/2006-09-18/dnsrbl.patch

Thanks,
_______________
--
Tadashi "ELF" Jokagi http://poyo.jp/
HotPHPPER News: http://news.hotphpper.net/
Japan PHP Users group BBS: http://bbs.php.gr.jp/
Sorry, all contents are Japanese;-(
« Last edit by Dietrich on Tue Sep 19, 2006 4:16 pm. »
Developer
Registered: Apr 2004
Posts: 2224
Location: Belgium
I don't know why, but it seems to work perfectly here:

dietrich@furious ~ $ php -r 'var_dump(checkdnsrr("4.13.113.203.list.dsbl.org","A"));'
bool(true)
dietrich@furious ~ $ host 4.13.113.203.list.dsbl.org
4.13.113.203.list.dsbl.org has address 127.0.0.2
dietrich@furious ~ $ php -r 'var_dump(checkdnsrr("100.1.168.192.list.dsbl.org","A"));'
bool(false)
dietrich@furious ~ $ host 100.1.168.192.list.dsbl.org
Host 100.1.168.192.list.dsbl.org not found: 3(NXDOMAIN)


I don't really get what the problem is.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: May 2005
Posts: 26
Location: Japan
Sorry, dns had setup containing a wild card in the environment where UseBB is worked.
Subject is set to [INVALID].

oh.
I did not get it.
I was not able to edit. :shock:
_______________
--
Tadashi "ELF" Jokagi http://poyo.jp/
HotPHPPER News: http://news.hotphpper.net/
Japan PHP Users group BBS: http://bbs.php.gr.jp/
Sorry, all contents are Japanese;-(
Developer
Registered: Apr 2004
Posts: 2224
Location: Belgium
Marked as invalid.

You can't alter your old posts. ;)
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog

Page: 1

UseBB Community » Bug Reports » [INVALID] RBL does not work correctly.

UseBB Community is powered by UseBB 1 Forum Software