jsmitty12 / phpWhois

phpWhois general repository
GNU General Public License v2.0
56 stars 20 forks source link

Infinite loop on some dates/times #92

Open e7o-de opened 2 years ago

e7o-de commented 2 years ago

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
)
kevinoo commented 2 years ago

Confirmed error for the following domains:

I am developing a branch to solve this problem.

maxiwheat commented 1 year ago

@kevinoo We are still experiencing this issue, do you still plan to solve it ?

kevinoo commented 1 year ago

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:

maxiwheat commented 1 year ago

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 ?

kevinoo commented 1 year ago

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:

ABouchard55 commented 1 year ago

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.

kevinoo commented 1 year ago

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!

matthiastosch commented 1 year ago

@kevinoo thanks a lot for the fix. Helped me out!

kevinoo commented 1 year ago

@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

matthiastosch commented 1 year ago

@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

e7o-de commented 1 year ago

@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 ...