phpWhois
phpWhois copied to clipboard
Infinite loop on some dates/times
The loop in whois.parser.php#L910 runs infinitely for values like
Creation Date: 2021-07-19T13:03:01.00Z
A print_r($res); just before the while shows this in my case:
Array
(
[m] => 2023
[d] => 07
[y] => 19T13:03:01
)
Confirmed error for the following domains:
- France (.fr)
- New Zeland (.nz)
I am developing a branch to solve this problem.
@kevinoo We are still experiencing this issue, do you still plan to solve it ?
Hi @maxiwheat can you give me an example with this error ?
I have a solution ready, however I would like to test with more cases.
The commit is in feature/kevinoo/Fr_Nz_Handler
Thanks :heart:
Hi @kevinoo, thanks for taking the time to look at it 🙏
We have this issue with the domain free.fr
Do you need a more complete sample of our code or only the domain is enough ?
All I needed was the domain, thanks! :smile:
I checked on the fly and I can confirm that the problem persists even with my fix, I'll try to correct it this week. :pray:
I just pushed a fix on https://github.com/ABouchard55/phpWhois , it seemed, in this case, to be a date parsing issue that didn't consider microseconds.
Hi @kevinoo, thanks for taking the time to look at it
Hi maxiwheat, I publish a new version v6.0.4 with the fix for FR and NZ domain :muscle:
You can download from packagist: kevinoo/phpwhois
Have a nice day!
@kevinoo thanks a lot for the fix. Helped me out!
@e7o-de @maxiwheat @matthiastosch
Dear all,
I wanted to notify that I release the version v6.2.0 packagist: kevinoo/phpwhois.
Include a lot of improvements :smile:
Improvements
- [#92] Infinite Loop - Possible final resolution of hell problem
- [#33] Add more patterns in AbstractHandler::parseStandardDate method
- [#33] Less duplicated code in FrHandler class
- [#33] Fixed version of "phpunit/phpunit" in composer.json
- [#33] Update Tests
- Update "fixtures" files
- [#33] Clean up Tests folder
- [#33] Update ParserTest
- [#33] Rename HandlerTestTest in AbstractHandler (to solve PHPUnit warning)
- [#33] In UnitTest, throw UnexpectedValueException when a no parsable date is found
- [#33] Minor fixed in IpTools.php
- [#33] Clean up code AbstractHandler.php
- [#33] Clean up code in AeHandler.php
- [#33] Use Handlers class instead file
whois.[tld].php - [#33] Use CzHandler instead whois.cz.php
- [#33] Use ZanetHandler instead whois.zanet.php
- [#33] Use XxxHandler instead whois.xxx.php
- [#33] Use WsHandler instead whois.ws.php
- [#33] Use VeHandler instead whois.ve.php
- [#33] Use UsHandler instead whois.us.php
- [#33] Use TodayHandler instead whois.today.php
- [#33] Use TodayHandler instead whois.today.php
- [#33] Use TelHandler instead whois.tel.php
- [#33] Use SuHandler instead whois.su.php
- [#33] Use SiHandler instead whois.si.php
- [#33] Use SeHandler instead whois.se.php
- [#33] Use ScHandler instead whois.sc.php
- [#33] Use RwhoisHandler instead whois.rwhois.php
- [#33] Use RuHandler instead whois.ru.php
- [#33] Use RoHandler instead whois.ro.php
- [#33] Use PtHandler instead whois.pt.php
- [#33] Use ProHandler instead whois.pro.php
- [#33] Use PlHandler instead whois.pl.php
- [#33] Use PhHandler instead whois.ph.php
- [#33] Use OrgHandler instead whois.org.php
- [#33] Use NuHandler instead whois.nu.php
- [#33] Use NoHandler instead whois.no.php
- [#33] Use EuHandler instead whois.eu.php
- [#33] Use DeHandler instead whois.de.php
- [#33] Use FiHandler instead whois.fi.php
- [#33] Use NlHandler instead whois.nl.php
- [#33] Use MxHandler instead whois.mx.php
- [#33] Use MuseumHandler instead whois.museum.php
- [#33] Use MobiHandler instead whois.mobi.php
- [#33] Use MeHandler instead whois.me.php
- [#33] Use LyHandler instead whois.ly.php
- [#33] Use LuHandler instead whois.lu.php
- [#33] Use LtHandler instead whois.lt.php
- [#33] Use FjHandler instead whois.fj.php
- [#33] Use LondonHandler instead whois.london.php
- [#33] Use JpHandler instead whois.jp.php
- [#33] Use ItHandler instead whois.it.php
- [#33] Use IsHandler instead whois.is.php
- [#33] Use IrHandler instead whois.ir.php
- [#33] Use IpHandler instead whois.ip.php
- [#33] Use IntHandler instead whois.int.php
- [#33] Use InHandler instead whois.in.php
- [#33] Use InfoHandler instead whois.info.php
- [#33] Use IlHandler instead whois.il.php
- [#33] Use IeHandler instead whois.ie.php
- [#33] Use HuHandler instead whois.hu.php
- [#33] Use FrHandler instead whois.fr.php
- [#33] Use FmHandler instead whois.fm.php
- [#33] Use CoopHandler instead whois.coop.php
- [#33] Use NameHandler instead whois.name.php
- [#33] Use DkHandler instead whois.dk.php
- [#33] Use DevHandler instead whois.dev.php
- [#33] Use CzHandler instead whois.cz.php
- [#33] Use CoHandler instead whois.co.php
- [#33] Use CnHandler instead whois.cn.php
- [#33] Use ChHandler instead whois.ch.php
- [#33] Use CatHandler instead whois.cat.php
- [#33] Use CaHandler instead whois.ca.php
Deprecation
- Remove obsolete file "handler.template.php"
- [#33] Remove deprecated "generic_parser_a_blocks" function
- [#33] Deprecated "get_contact" function
@kevinoo nice. I switched to your version 6.1. That fixed all the last issues - so I could remove my fixes in my application. Thanks again for your efforts
@kevinoo thank you very much, now I can finally get rid of my fancy workarounds with pre-parsing via RegEx and direct instantiation ;) Oh, that was ugly ...