Bug 1308791 - curl with libpsl
Summary: curl with libpsl
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: curl
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-16 05:40 UTC by Remi Collet
Modified: 2016-03-08 14:53 UTC (History)
4 users (show)

Fixed In Version: curl-7.47.1-4.fc25 curl-7.47.1-4.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-03 09:22:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Remi Collet 2016-02-16 05:40:14 UTC
Since curl is built with libpsl, pecl_http test suite fails.

This a tracker bug to not loose this.

Upstream report (with curl upstream involved)

libpsl: https://github.com/rockdaboot/libpsl/issues/48
pecl_http: https://github.com/m6w6/ext-http/issues/26


Perhaps we should revert this option for F24, waiting for a upstream fix.

Comment 1 Remi Collet 2016-02-16 05:42:35 UTC
To summarize, all non qualified domain (ex: "localhost") are considered by libpsl as "public suffix", and thus curl ignore the cookie.

Add cicku, libpsl maintainer in CC.

Comment 2 Kamil Dudka 2016-02-16 06:57:27 UTC
(In reply to Remi Collet from comment #0)
> Perhaps we should revert this option for F24, waiting for a upstream fix.

Given the fact that we have not received any bug report except the php-pecl-http one, I do not think this is a major regression requiring an immediate revert.  I would prefer to wait few more days to see whether the actual fix will go to libcurl or libpsl.

Paul, what is your opinion on this?  Should we revert the libpsl support now?

Comment 3 Remi Collet 2016-02-16 07:17:03 UTC
After digging a little in other applications using the libpsl, I think the usage in libcurl is not correct (so the bug is "in" curl, not in libpsl)

The check should probably use psl_is_cookie_domain_acceptable instead of psl_is_public_suffix.

Comment 5 Kamil Dudka 2016-02-16 07:23:51 UTC
Thanks for digging!  This is kind of surprising because the libcurl code your refer to is contributed by the libpsl maintainer:

https://github.com/curl/curl/commit/e77b5b74

Comment 6 Remi Collet 2016-02-16 07:24:11 UTC
Also https://github.com/curl/curl/issues/658

Comment 7 Paul Howarth 2016-02-16 09:29:15 UTC
(In reply to Kamil Dudka from comment #2)
> (In reply to Remi Collet from comment #0)
> > Perhaps we should revert this option for F24, waiting for a upstream fix.
> 
> Given the fact that we have not received any bug report except the
> php-pecl-http one, I do not think this is a major regression requiring an
> immediate revert.  I would prefer to wait few more days to see whether the
> actual fix will go to libcurl or libpsl.
> 
> Paul, what is your opinion on this?  Should we revert the libpsl support now?

I'm in favour of "wait and see" for the moment. The psl_is_cookie_domain_acceptable approach looks promising, as would allowing cookies for the same hostname as the HTTP host. I think it's likely that there will be a change in curl to address this anyway.

Comment 8 Jan Kurik 2016-02-24 15:22:14 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 9 Kamil Dudka 2016-03-03 07:12:43 UTC
Could you please check whether curl-7.47.1-4.fc25 works good enough for you?

http://koji.fedoraproject.org/koji/buildinfo?buildID=741218

Comment 10 Remi Collet 2016-03-03 07:48:31 UTC
See https://apps.fedoraproject.org/koschei/package/php-pecl-http

Yes, curl-7.47.1-4.fc25 fix this issue.
Thanks.

Comment 11 Kamil Dudka 2016-03-03 09:22:06 UTC
Thanks for confirmation!  Fixed in curl-7.47.1-4.fc24.

Comment 12 Kamil Dudka 2016-03-08 14:53:06 UTC
upstream commit:

https://github.com/curl/curl/commit/c140bd78


Note You need to log in before you can comment on or make changes to this bug.