#
c0450488 |
| 21-Aug-2024 |
Viktor Szakats |
src: fix potential macro confusion in cmake unity builds Sources used `lib/curlx.h` with both `ENABLE_CURLX_PRINTF` set and unset before including it. In a cmake "unity" batch w
src: fix potential macro confusion in cmake unity builds Sources used `lib/curlx.h` with both `ENABLE_CURLX_PRINTF` set and unset before including it. In a cmake "unity" batch where the first included source had it unset, the next sources did not get the macros requested with `ENABLE_CURLX_PRINTF` because `lib/curl.x` had already been included without them. Fix it by by making the macros enabled permanently and globally for internal sources, and dropping `ENABLE_CURLX_PRINTF`. This came up while testing unity builds with smaller batches. The full, default unity build where all `src` is bundled up in a single unit, was not affected. Fixes: ``` $ cmake -B build -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=15 $ make -C build ... curl/src/tool_getparam.c: In function ‘getparameter’: curl/src/tool_getparam.c:2409:11: error: implicit declaration of function ‘msnprintf’; did you mean ‘vsnprintf’? [-Wimplicit-function-declaration] 2409 | msnprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", | ^~~~~~~~~ | vsnprintf curl/src/tool_getparam.c:2409:11: warning: nested extern declaration of ‘msnprintf’ [-Wnested-externs] [...] ``` Reported-by: Daniel Stenberg Bug: https://github.com/curl/curl/pull/14626#issuecomment-2301663491 Closes #14632
show more ...
|
#
c074ba64 |
| 01-Jul-2024 |
Daniel Stenberg |
code: language cleanup in comments Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname
code: language cleanup in comments Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname - file name => filename - user name = username - man page => manpage - run-time => runtime - set-up => setup - back-end => backend - a HTTP => an HTTP - Two spaces after a period => one space after period Closes #14073
show more ...
|
#
50def7c8 |
| 31-Mar-2024 |
Daniel Stenberg |
NTLM_WB: drop support The feature has not worked for months and has been marked as DEPRECATED for six+ months. Closes #13249
|
#
40948189 |
| 14-Mar-2024 |
Daniel Stenberg |
curl: make --libcurl output better CURLOPT_*SSLVERSION The option is really two enums ORed together, so it needs special attention to make the code output nice. Added test 1481
curl: make --libcurl output better CURLOPT_*SSLVERSION The option is really two enums ORed together, so it needs special attention to make the code output nice. Added test 1481 to verify. Both the server and the proxy versions. Reported-by: Boris Verkhovskiy Fixes #13127 Closes #13129
show more ...
|
#
5b286c25 |
| 27-Jan-2024 |
Viktor Szakats |
build: delete/replace clang warning pragmas - delete redundant warning suppressions for `-Wformat-nonliteral`. This now relies on `CURL_PRINTF()` and it's theoratically possible
build: delete/replace clang warning pragmas - delete redundant warning suppressions for `-Wformat-nonliteral`. This now relies on `CURL_PRINTF()` and it's theoratically possible that this macro isn't active but the warning is. We're ignoring this as a corner-case here. - replace two pragmas with code changes to avoid the warnings. Follow-up to aee4ebe59161d0a5281743f96e7738ad97fe1cd4 #12803 Follow-up to 09230127589eccc7e01c1a7217787ef8e64f3328 #12540 Follow-up to 3829759bd042c03225ae862062560f568ba1a231 #12489 Reviewed-by: Daniel Stenberg Closes #12812
show more ...
|
#
1f4433da |
| 08-Jan-2024 |
Daniel Stenberg |
tool_getparam: build post data using dynbuf (more)
|
#
3829759b |
| 08-Dec-2023 |
Viktor Szakats |
build: enable missing OpenSSF-recommended warnings, with fixes https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html as of 2023-11-29 [1]
build: enable missing OpenSSF-recommended warnings, with fixes https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html as of 2023-11-29 [1]. Enable new recommended warnings (except `-Wsign-conversion`): - enable `-Wformat=2` for clang (in both cmake and autotools). - add `CURL_PRINTF()` internal attribute and mark functions accepting printf arguments with it. This is a copy of existing `CURL_TEMP_PRINTF()` but using `__printf__` to make it compatible with redefinting the `printf` symbol: https://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_5.html#SEC94 - fix `CURL_PRINTF()` and existing `CURL_TEMP_PRINTF()` for mingw-w64 and enable it on this platform. - enable `-Wimplicit-fallthrough`. - enable `-Wtrampolines`. - add `-Wsign-conversion` commented with a FIXME. - cmake: enable `-pedantic-errors` the way we do it with autotools. Follow-up to d5c0351055d5709da8f3e16c91348092fdb481aa #2747 - lib/curl_trc.h: use `CURL_FORMAT()`, this also fixes it to enable format checks. Previously it was always disabled due to the internal `printf` macro. Fix them: - fix bug where an `set_ipv6_v6only()` call was missed in builds with `--disable-verbose` / `CURL_DISABLE_VERBOSE_STRINGS=ON`. - add internal `FALLTHROUGH()` macro. - replace obsolete fall-through comments with `FALLTHROUGH()`. - fix fallthrough markups: Delete redundant ones (showing up as warnings in most cases). Add missing ones. Fix indentation. - silence `-Wformat-nonliteral` warnings with llvm/clang. - fix one `-Wformat-nonliteral` warning. - fix new `-Wformat` and `-Wformat-security` warnings. - fix `CURL_FORMAT_SOCKET_T` value for mingw-w64. Also move its definition to `lib/curl_setup.h` allowing use in `tests/server`. - lib: fix two wrongly passed string arguments in log outputs. Co-authored-by: Jay Satiro - fix new `-Wformat` warnings on mingw-w64. [1] https://github.com/ossf/wg-best-practices-os-developers/blob/56c0fde3895bfc55c8a973ef49a2572c507b2ae1/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C%2B%2B.md Closes #12489
show more ...
|
#
f0f421b4 |
| 25-Sep-2023 |
Dan Fandrich |
tool_setopt: remove unused function tool_setopt_flags This function is identical to tool_setopt_bitmask except that it treats the argument as unsigned. Closes #11943
|
#
ce1fc742 |
| 02-Aug-2023 |
Daniel Stenberg |
tool: make the length argument an int for printf()-.* flags Closes #11578
|
#
6d45b9ca |
| 30-May-2023 |
Daniel Stenberg |
tool: remove newlines from all helpf/notef/warnf/errorf calls Make voutf() always add one. Closes #11226
|
#
f198d33e |
| 18-May-2023 |
Emanuele Torre |
checksrc: disallow spaces before labels Out of 415 labels throughout the code base, 86 of those labels were not at the start of the line. Which means labels always at the start of th
checksrc: disallow spaces before labels Out of 415 labels throughout the code base, 86 of those labels were not at the start of the line. Which means labels always at the start of the line is the favoured style overall with 329 instances. Out of the 86 labels not at the start of the line: * 75 were indented with the same indentation level of the following line * 8 were indented with exactly one space * 2 were indented with one fewer indentation level then the following line * 1 was indented with the indentation level of the following line minus three space (probably unintentional) Co-Authored-By: Viktor Szakats Closes #11134
show more ...
|
#
13991d60 |
| 09-Jan-2023 |
Daniel Stenberg |
src: add --http3-only Warning: --http3 and --http3-only are subject to change again (or be removed) before HTTP/3 support goes non-experimental. Closes #10264
|
#
2bc1d775 |
| 02-Jan-2023 |
Daniel Stenberg |
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - save
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - saves us from pointless churn - git keeps history for us - the year range is kept in COPYING checksrc is updated to allow non-year using copyright statements Closes #10205
show more ...
|
#
279834dd |
| 24-Oct-2022 |
Daniel Stenberg |
misc: remove duplicated include files Closes #9796
|
#
2e475deb |
| 05-Oct-2022 |
Patrick Monnerat |
tool: reorganize function c_escape around a dynbuf This is a bit shorter and a lot safer. Substrings of unescaped characters are added by a single call to reduce overhead.
tool: reorganize function c_escape around a dynbuf This is a bit shorter and a lot safer. Substrings of unescaped characters are added by a single call to reduce overhead. Extend test 1465 to handle more kind of escapes. Closes #9653
show more ...
|
#
172259c4 |
| 04-Oct-2022 |
Patrick Monnerat |
tool: avoid generating ambiguous escaped characters in --libcurl C string hexadecimal-escaped characters may have more than 2 digits. This results in a wrong C compiler interpretation of
tool: avoid generating ambiguous escaped characters in --libcurl C string hexadecimal-escaped characters may have more than 2 digits. This results in a wrong C compiler interpretation of a 2-digit escaped character when followed by an hex digit character. The solution retained here is to represent such characters as 3-digit octal escapes. Adjust and extend test 1465 for this case. Closes #9643
show more ...
|
#
dd2a0243 |
| 15-Sep-2022 |
Patrick Monnerat |
cli tool: do not use disabled protocols As they are now rejected by the library, take care of not passing disabled protocol names to CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS
cli tool: do not use disabled protocols As they are now rejected by the library, take care of not passing disabled protocol names to CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR. Rather than using the CURLPROTO_* constants, dynamically assign protocol numbers based on the order they are listed by curl_version_info(). New type proto_set_t implements prototype bit masks: it should therefore be large enough to accomodate all library-enabled protocols. If not, protocol numbers beyond the bit count of proto_set_t are recognized but "inaccessible": when used, a warning is displayed and the value is ignored. Should proto_set_t overflows, enabled protocols are reordered to force those having a public CURLPROTO_* representation to be accessible. Code has been added to subordinate RTMP?* protocols to the presence of RTMP in the enabled protocol list, being returned by curl_version_info() or not.
show more ...
|
#
5d254bbc |
| 11-Sep-2022 |
Daniel Stenberg |
tool_setopt: use better English in --libcurl source comments Like this: XYZ was set to an object pointer ABC was set to a function pointer Closes #9475
|
#
8dd95da3 |
| 05-Sep-2022 |
Daniel Stenberg |
ctype: remove all use of <ctype.h>, use our own versions Except in the test servers. Closes #9433
|
#
ad9bc597 |
| 17-May-2022 |
max.mehl |
copyright: make repository REUSE compliant Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the
copyright: make repository REUSE compliant Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the file `.reuse/dep5`. This commit also adds a Github workflow to check pull requests and adapts copyright.pl to the changes. Closes #8869
show more ...
|
#
60452236 |
| 24-Apr-2022 |
Daniel Stenberg |
c_escape: escape '?' in generated --libcurl code In order to avoid the risk of it being used in an accidental trigraph in the generated code. Reported-by: Harry Sintonen Bug
c_escape: escape '?' in generated --libcurl code In order to avoid the risk of it being used in an accidental trigraph in the generated code. Reported-by: Harry Sintonen Bug: https://hackerone.com/reports/1548535 Closes #8742
show more ...
|
#
95e8515c |
| 09-Mar-2022 |
Daniel Stenberg |
curl: error out when options need features not present in libcurl Trying to use a proxy when libcurl was built with proxy support disabled should make curl error out properly. R
curl: error out when options need features not present in libcurl Trying to use a proxy when libcurl was built with proxy support disabled should make curl error out properly. Remove knowledge of disabled features from the tool code and instead make it properly respond to what libcurl returns. Update all tests to properly require the necessary features to be present/absent so that the test suite can still be run even with libcurl builds with disabled features. Ref: https://curl.se/mail/archive-2022-03/0013.html Closes #8565
show more ...
|
#
26101421 |
| 03-Feb-2022 |
Daniel Stenberg |
lib: remove support for CURL_DOES_CONVERSIONS TPF was the only user and support for that was dropped. Closes #8378
|
#
82d33400 |
| 20-May-2021 |
Daniel Stenberg |
copyright: update copyright year ranges to 2021
|
Revision tags: curl-7_76_1, curl-7_76_0 |
|
#
54e74750 |
| 27-Feb-2021 |
Jay Satiro |
schannel: Disable auto credentials; add an option to enable it - Disable auto credentials by default. This is a breaking change for clients that are using it, wittingly or not.
schannel: Disable auto credentials; add an option to enable it - Disable auto credentials by default. This is a breaking change for clients that are using it, wittingly or not. - New libcurl ssl option value CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use a client certificate for authentication, when requested by the server. - New curl tool options --ssl-auto-client-cert and --proxy-ssl-auto-client-cert map to CURLSSLOPT_AUTO_CLIENT_CERT. This option is only supported for Schannel (the native Windows SSL library). Prior to this change Schannel would, with no notification to the client, attempt to locate a client certificate and send it to the server, when requested by the server. Since the server can request any certificate that supports client authentication in the OS certificate store it could be a privacy violation and unexpected. Fixes https://github.com/curl/curl/issues/2262 Reported-by: Jeroen Ooms Assisted-by: Wes Hinsley Assisted-by: Rich FitzJohn Ref: https://curl.se/mail/lib-2021-02/0066.html Reported-by: Morten Minde Neergaard Closes https://github.com/curl/curl/pull/6673
show more ...
|