72 Commits

Author SHA1 Message Date
Viktor Szakats
1021c52c92 REUSE: add copyright header to two files
`.mailmap` supports comments and empty lines since at least 2.31.0:
https://git-scm.com/docs/gitmailmap/2.31.0

Closes #19339
2025-11-03 16:08:52 +01:00
Daniel Stenberg
3b2cfa55a0 mailmap: unify on James 2025-09-08 09:26:22 +02:00
Ruocco, Calvin
d3594be653 ws: tests and fixes
This started out as regression tests for the `curl_ws_recv()` and
`curl_ws_send()` implementation and ended up with a bugfix, additional
protocol validation and minor logging improvements.

- Fix reset of fragmented message decoder state when a PING/PONG is
  received in between message fragments.

- Fix undefined behavior (applying zero offset to null pointer) in
  curl_ws_send() when the given buffer is NULL.

- Detect invalid overlong PING/PONG/CLOSE frames.
- Detect invalid fragmented PING/PONG/CLOSE frames.
- Detect invalid sequences of fragmented frames.

  - a) A continuation frame (0x80...) is received without any ongoing
    fragmented message.
  - b) A new fragmented message is started (0x81/0x01/0x82/0x02...)
    before the ongoing fragmented message has terminated.

- Made logs for invalid opcodes easier to understand.
- Moved noisy logs to the `CURL_TRC_WS` log level.
- Unified the prefixes for WebSocket log messages: `[WS] ...`

- Add env var `CURL_WS_FORCE_ZERO_MASK` in debug builds.

  - If set, it forces the bit mask applied to outgoing payloads to
    0x00000000, which effectively means the payload is not masked at
    all. This drastically simplifies defining the expected `<protocol>`
    data in test cases.

- 2700: Frame types
- 2701: Invalid opcode 0x3
- 2702: Invalid opcode 0xB
- 2703: Invalid reserved bit RSV1 _(replaces 2310)_
- 2704: Invalid reserved bit RSV2
- 2705: Invalid reserved bit RSV3
- 2706: Invalid masked server message
- 2707: Peculiar frame sizes _(part. replaces 2311)_
- 2708: Automatic PONG
- 2709: No automatic PONG _(replaces 2312)_
- 2710: Unsolicited PONG
- 2711: Empty PING/PONG/CLOSE
- 2712: Max sized PING/PONG/CLOSE
- 2713: Invalid oversized PING _(replaces 2307)_
- 2714: Invalid oversized PONG
- 2715: Invalid oversized CLOSE
- 2716: Invalid fragmented PING
- 2717: Invalid fragmented PONG
- 2718: Invalid fragmented CLOSE
- 2719: Fragmented messages _(part. replaces 2311)_
- 2720: Fragmented messages with empty fragments
- 2721: Fragmented messages with interleaved pong
- 2722: Invalid fragmented message without initial frame
- 2723: Invalid fragmented message without final frame

- 2305: curl_ws_recv() loop reading three larger frames
  - This test involuntarily sent an invalid sequence of opcodes (0x01...,0x01...,0x81...) , but neither libcurl nor the test caught this! The correct sequence was tested in 2311 (0x01...,0x00...,0x80...). See below for 2311.
  - Validation of the opcode sequence was added to libcurl and is now tested in 2723.
  - Superseded by 2719 (fragmented message) and 2707 (large frames).
- 2307: overlong PING payload
  - The tested PING payload length check was actually missing, but the test didn't catch this since it involuntarily sent an invalid opcode (0x19... instead of 0x89...) so that the expected error occurred, but for the wrong reason.
  - Superseded by 2713.
- 2310: unknown reserved bit set in frame header
  - Superseded by 2703 and extended by 2704 and 2705.
- 2311: curl_ws_recv() read fragmented message
  - Superseded by 2719 (fragmented message) and 2707 (large frames).
- 2312: WebSockets no auto ping
  - Superseded by 2709.

- No tests for `CURLOPT_WRITEFUNCTION`.
- No tests for sending of invalid frames/fragments.

Closes #17136
2025-06-02 11:15:38 +02:00
sftcd
1ae47b91a3 ECH: update APIs to those agreed with OpenSSL maintainers
Closes #15945
2025-01-10 08:36:25 +01:00
andrewkirillov-ibm
4bba14c35d dmaketgz: use --no-cache when building docker image
Fixes #15689
Closes #15690
2024-12-05 15:41:53 +01:00
ArtSin
0325e1b9b2 mprintf: treat %o as unsigned, add tests for %o, %x, %X
`%x` and `%X` were already treated as unsigned, but `%o` was not, even
though it was used with unsigned numbers.

Closes #15348
2024-10-24 10:17:24 +02:00
Daniel Stenberg
98395155d7 mailmap: Aki Sakurai 2024-08-30 10:28:34 +02:00
Daniel Stenberg
fa37248d0e mailmap: add Moritz Buhl 2024-08-27 14:03:47 +02:00
Daniel Stenberg
d40bba3ff9 mailmap: dedupe an author showing up twice in shortlog -s 2024-07-30 14:25:30 +02:00
Daniel Stenberg
49573bc187 .mailmap: update Gisle's preferred email 2024-04-09 08:50:07 +02:00
Daniel Stenberg
bc5502a7be mailmap: unify Michael Osipov under a single email 2023-09-21 14:18:49 +02:00
Daniel Stenberg
50e563253d mailmap: add Derzsi Dániel 2023-07-31 08:29:16 +02:00
bch
bc642cb333 websocket: rename arguments/variables to match docs
Pedantry/semantic-alignment between functions, docs, comments with
respect to websocket protocol code; No functional change intended.

* "totalsize", "framesize" becomes "fragsize" (we deal in frame fragments).

* "sendflags" becomes "flags"

* use canonical CURL *handle

Closes #11493
2023-07-22 00:31:31 +02:00
dengjfzh
6c6306f300 rtsp: skip malformed RTSP interleaved frame data
Some IP cameras send malformed RTSP interleaved frames sometimes, which
can cause curl_easy_perform return 1 (CURLE_UNSUPPORTED_PROTOCOL).  This
change attempts to skip clearly incorrect RTSP interleaving frame data.

Closes #10808
2023-03-30 09:59:09 +02:00
Daniel Stenberg
2537808d9e mailmap: Thomas1664 on github 2023-02-03 10:04:34 +01:00
Daniel Stenberg
cbaa80ae20 mailmap: Andy Alt 2022-12-06 23:23:13 +01:00
mickae1
8fe33a9661 libssh2: return error when ssh_hostkeyfunc returns error
return CURLE_PEER_FAILED_VERIFICATION if verification with the callback
return a result different than CURLKHMATCH_OK

Closes #10034
2022-12-06 00:15:18 +01:00
Daniel Stenberg
f9618ffe40 mailmap: unify Stefan Eissing 2022-11-07 12:24:07 +01:00
bsergean
e71a9b488f asyn-ares: set hint flags when calling ares_getaddrinfo
The hint flag is ARES_AI_NUMERICSERV, and it will save a call to
getservbyname or getservbyname_r to set it.

Closes #9694
2022-10-11 08:23:33 +02:00
Daniel Stenberg
29a6cf968e mailmap: merge Philip Heiduck's two addresses into one 2022-09-16 16:46:32 +02:00
zhanghu
0f52dd5fd5 formdata: fix warning: 'CURLformoption' is promoted to 'int'
curl/lib/formdata.c: In function 'FormAdd':
curl/lib/formdata.c:249:31: warning: 'CURLformoption' is promoted to 'int' when passed through '...'
  249 |       option = va_arg(params, CURLformoption);
      |                               ^
curl/lib/formdata.c:249:31: note: (so you should pass 'int' not 'CURLformoption' to 'va_arg')
curl/lib/formdata.c:249:31: note: if this code is reached, the program will abort

Closes #9484
2022-09-13 11:24:40 +02:00
a1346054
c3a6165307 scripts: use grep -E instead of egrep
egrep is deprecated

Closes #9491
2022-09-13 10:18:50 +02:00
Cering
6ba3047378 connect: add quic connection information
Fixes #9286
Closes #9287
2022-08-10 08:41:50 +02:00
opensignature
dc8c859b0c openssl: add details to "unable to set client certificate" error
from: "curl: (58) unable to set client certificate"

to: curl: (58) unable to set client certificate [error:0A00018F:SSL
routines::ee key too small]

Closes #9228
2022-08-08 09:49:38 +02:00
Futaura
c7b322aac8 configure: -pthread not available on AmigaOS 4.x
The most recent GCC builds for AmigaOS 4.x do not allow -pthread and
exit with an error. Instead, need to explictly specify -lpthread.

Closes #9266
2022-08-08 09:07:37 +02:00
Daniel Stenberg
0c47d879ae mailmap: add rzrymiak on github 2022-07-27 10:56:13 +02:00
Daniel Stenberg
a8e02881ec .mailmap: additional edit
Follow-up to 861e2a8aca so that Evgeny appears with the same in git
logs even when using old email.
2022-07-01 09:57:04 +02:00
Evgeny Grin (Karlson2k)
861e2a8aca .mailmap: updated 2022-07-01 09:49:14 +02:00
Daniel Stenberg
5ccddf6439 mailmap: Max Mehl 2022-06-13 09:14:07 +02:00
Philip H
613bf27771 .mailmap: update
Closes #8800
2022-05-05 10:24:17 +02:00
MonkeybreadSoftware
62d5818242 strcase.h: add comment about the return code
Tool often we run into expecting this to work like strcmp, but it
returns 1 instead of 0 for match.

Closes #8658
2022-03-31 11:35:27 +02:00
Daniel Stenberg
94d4a065a9 mailmap: Henrik Holst 2022-02-02 13:03:38 +01:00
Daniel Stenberg
9a8888c94b mailmap: Jan-Piet Mens 2022-01-31 09:39:48 +01:00
Daniel Stenberg
2c7d6b9cf0 mailmap: neutric on github 2022-01-30 11:55:49 +01:00
Daniel Stenberg
e35637f193 mailmap: spellfix githuh => github 2022-01-25 12:05:06 +01:00
Daniel Stenberg
6e7ce9bbfb mailmap: Xiaoke Wang 2022-01-07 09:59:41 +01:00
Daniel Stenberg
771ca5d000 mailmap: add Yongkang Huang
From #8141
2021-12-14 14:48:30 +01:00
Daniel Stenberg
09a8b83c2d mailmap: Malik Idrees Hasan Khan 2021-10-21 09:44:46 +02:00
Abhinav Singh
8c6f126279 aws-sigv4: make signature work when post data is binary
User sets the post fields size for binary data.  Hence, we should not be
using strlen on it.

Added test 1937 and 1938 to verify.

Closes #7844
2021-10-15 08:46:23 +02:00
Daniel Stenberg
31692f17c9 mailmap: unify Max! 2021-09-27 17:22:00 +02:00
Daniel Stenberg
77c739909b mailmap: add Gleb Ivanovsky 2021-08-21 16:38:06 +02:00
Daniel Stenberg
697970c1de mailmap: fixup Michał Antoniak 2021-08-14 23:23:09 +02:00
Daniel Stenberg
c0895f8e13 mailmap: add Tobias and Timur 2021-07-19 09:20:58 +02:00
Daniel Stenberg
62d91e0078 mailmap: Jon Rumsey 2021-02-05 08:46:11 +01:00
Daniel Gustafsson
3ba04d5d88 mailmap: Daniel Hwang
Add Daniel Hwang to the mailmap to cover the alternative spelling
Daniel Lee Hwang which was used in one commit.

Closes #6230
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2020-11-20 11:05:46 +01:00
Daniel Stenberg
4c615eace7 mailmap: set Viktor Szakats's email 2020-10-28 11:10:54 +01:00
Daniel Stenberg
eafe1eaff7 mailmap: fixups of some contributors 2020-10-14 07:50:16 +02:00
Daniel Stenberg
ac91b0dd71 mailmap: Nicolas Sterchele 2020-06-12 13:41:52 +02:00
Daniel Stenberg
42ed22fea6 mailmap: Don J Olmstead 2020-06-04 23:53:44 +02:00
Daniel Stenberg
61504b5ef9 mailmap: James Fuller 2020-05-14 08:55:00 +02:00