Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix curl_basic_022.phpt for libcurl 8.12.0 #17709

Closed
wants to merge 1 commit into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Feb 5, 2025

Due to a deliberate change in libcurl, the expiration is now capped to at most 400 days. We could solve this by choosing another date roughly a year in the future, but would need to update the test next year. This would be especially annoying for security branches.

Another option would be to actually parse the cookie list lines, but that might not be worth the trouble. Instead we just ignore the exact timestamp created by libcurl.

[1] curl/curl#15937

Due to a deliberate change in libcurl, the expiration is now capped to
at most 400 days.  We could solve this by choosing another date roughly
a year in the future, but would need to update the test next year.
This would be especially annoying for security branches.

Another option would be to actually parse the cookie list lines, but
that might not be worth the trouble.  Instead we just ignore the exact
timestamp created by libcurl.

[1] <curl/curl#15937>
@Ayesh
Copy link
Member

Ayesh commented Feb 5, 2025

I can confirm the test indeed fails and the PR fixes it. It's up to Curl to limit the cookie expiration, and I think %d check is enough for us to check if we indeed return a timestamp.

========DIFF========
     array(2) {
       [0]=>
003-   string(38) ".php.net     TRUE    /       FALSE   2145916799      C1      v1"
003+   string(38) ".php.net     TRUE    /       FALSE   1773338520      C1      v1"
       [1]=>
005-   string(38) ".php.net     TRUE    /       FALSE   2145916799      C2      v2"
005+   string(38) ".php.net     TRUE    /       FALSE   1773338520      C2      v2"
     }
========DONE========
FAIL Test curl_getinfo() function with CURLINFO_COOKIELIST parameter [ext/curl/tests/curl_basic_022.phpt]

@cmb69 cmb69 closed this in 36d46a4 Feb 5, 2025
@andypost
Copy link
Contributor

Thank you! it fixed the test on Alpinelinux

@cmb69 cmb69 deleted the cmb/curl_basic_022.phpt branch February 11, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants