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

Returning CURLSTS_FAIL from HSTSREADFUNCTION does not abort the request #7726

Closed
JCMais opened this issue Sep 15, 2021 · 1 comment
Closed
Assignees

Comments

@JCMais
Copy link
Contributor

JCMais commented Sep 15, 2021

I did this

Created a new easy handle, and set the HSTSREADFUNCTION option to a callback that always returns CURLSTS_FAIL.

I expected the following

The request is aborted as the HSTSREADFUNCTION callback is called before the transfer is made.

What happens is that the request is not aborted. this happens when using the multi interface and also when using the easy handle directly.

curl/libcurl version

curl 7.78.0 (x86_64-pc-linux-gnu) libcurl/7.78.0 OpenSSL/1.1.1k zlib/1.2.11 brotli/1.0.9 zstd/1.4.9 libidn2/2.1.1 libssh2/1.9.0 nghttp2/1.41.0 OpenLDAP/2.4.47
Release-Date: 2021-07-21
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS brotli Debug HSTS HTTP2 HTTPS-proxy IDN IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP TrackMemory UnixSockets zstd

operating system

uname -a

Linux JCM-PC 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic

gcc: 7.5.0

@JCMais JCMais changed the title Returning CURLSTS_FAIL from HSTSREADFUNCTION does not abort the request when using the multi interface Returning CURLSTS_FAIL from HSTSREADFUNCTION does not abort the request Sep 15, 2021
@bagder bagder self-assigned this Sep 16, 2021
bagder added a commit that referenced this issue Sep 16, 2021
... and have CURLE_ABORTED_BY_CALLBACK returned.

Extended test 1915 to verify.

Reported-by: Jonathan Cardoso
Fixes #7726
bagder added a commit that referenced this issue Sep 16, 2021
... and have CURLE_ABORTED_BY_CALLBACK returned.

Extended test 1915 to verify.

Reported-by: Jonathan Cardoso
Fixes #7726
@bagder bagder closed this as completed in da2598f Sep 16, 2021
@JCMais
Copy link
Contributor Author

JCMais commented Sep 16, 2021

Thanks for fixing this @bagder!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants