Commit graph

1866 commits

Author SHA1 Message Date
Michael Behrns-Miller [case-ubuntu]
9207bc51bb Subject: Buffer index protection in the case where client does not
receive content length from HTTP server
2017-03-03 05:42:47 +08:00
Whisperbyte
9892280467 docs: mac: add info from github 2017-03-01 18:00:00 +08:00
Silas Parker
a5f64f9f4d cosmetic fix trailing newline on log 2017-02-28 18:39:21 +08:00
Andy Green
a218d779b6 client: take care of rx close during pending partial same as server does
https://github.com/warmcat/libwebsockets/issues/816
2017-02-28 18:38:38 +08:00
Martin Milata
7ad81d6cdd gcc format strings: couple more 2017-02-22 07:14:06 +08:00
Yuchen Xie
7fb607720d Fix typo 2017-02-18 15:55:16 +08:00
Yongwen Zhuang
de22418879 Correct Cross compiling commandline 2017-02-15 18:18:01 +08:00
Andy Green
d317a96b27 v2.1.1 2017-02-15 18:03:12 +08:00
Silas Parker
e2fcf47f03 fix close packet index coding
https://github.com/warmcat/libwebsockets/issues/792
2017-02-14 23:25:15 +08:00
Andy Green
b95e7fe466 gcc format strings: http2 2017-02-05 22:46:39 +08:00
Andy Green
0b7ca30ed1 gcc- format strings: debug and extra plugins 2017-02-05 22:32:07 +08:00
Martin Milata
b03b17fd0b Subject: gcc format strings: Make GCC check format strings, fix found problems 2017-02-05 22:12:57 +08:00
Sven Hoffmann
a238984d1b post processing: fix problem where hex cant straddle block correctly 2017-02-05 22:12:33 +08:00
Tobias
109d66c365 ignore leading spaces when checking for a suitable subprotocol
My Browsers send as Subprotocols e.g. chat, superchat, mySubprotocol (with spaces after the ,). Libwebsockets now checked if ' mySubprotocol' was equal to 'mySubprotocol' which failed. With this fix the leading space is ignored and uses 'mySubprotocol' for comparision.
2017-01-17 06:28:27 +08:00
Andy Green
da6f03b423 ssl: wolfssl doesn't have clear options
https://github.com/warmcat/libwebsockets/issues/741
2017-01-10 09:16:49 +08:00
Hai Vu
c9d165bbcc ssl-correct-option-clear-availability-version
https://github.com/warmcat/libwebsockets/issues/744
2017-01-10 09:16:41 +08:00
Andy Green
8283659047 polarssl: turn off missing tlsext 2017-01-07 10:24:50 +08:00
Andy Green
c447e1f9f3 openssl: deal with missing OPENSSL_NO_TLSEXT on ancient versions 2017-01-07 10:24:42 +08:00
Denis Osvald
9706dd23a2 server: check listen(2) return value
The `listen` call can fail with EADDRINUSE after bind() succeeds, for
example because another process called listen on that port in the
meantime, or under some circumstances with IPv6-mapped-IPv4. This was
causing EINVAL on accept, with an infinite loop in case of libuv.

A reproducible example was to run nc -l -p 5555 ( OpenBSD netcat (Debian
patchlevel 1)) before starting test-server

Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2017-01-03 02:04:11 +08:00
namowen
837e7fdd14 lws_plat_service_tsi: accessing context before checking for NULL
https://github.com/warmcat/libwebsockets/issues/730
2016-12-24 08:03:04 +08:00
Namowen
d2cb05f1f6 echo: fix debug build
https://github.com/warmcat/libwebsockets/issues/716#issuecomment-267377856
2016-12-16 07:05:29 +08:00
Andy Green
d170ed0623 test-client: fix broken protocol names 2016-12-15 13:42:44 +08:00
Andy Green
39807c1d10 client ssl hostname check: trim any port on host header 2016-12-15 13:27:13 +08:00
Andy Green
6dce477aef ipv6-allow-binding-to-ipv6-address-in-iface
ipv4 and ipv6 binding to a named interface works OK.  ipv4 binding to an IP also
works, but we need some extra ipv6 magic to identify the ipv6 interface from an
ipv6 address.

This patch based on code from "user3546716" at
http://stackoverflow.com/questions/13504934/binding-sockets-to-ipv6-addresses

adds the necessary magic.

https://github.com/warmcat/libwebsockets/issues/717
2016-12-15 10:09:55 +08:00
Andy Green
cf8b922df5 client: if NULL protocol vhost same linked list entry
Lws maintains a linked-list of wsi that are on the same vhost protocol...
it walks it to perform ..._all_protocol() type apis.

Client connections also participate in this list, but in the case the
selected protocol is not given during negotation (a legal case where
the server default protocol is selected) we missed adding the new
ws negotiated client wsi to the list.

This patch makes sure we add the wsi to the vhost protocols[0] list
in that case.

https://github.com/warmcat/libwebsockets/issues/716
2016-12-15 08:38:35 +08:00
Andy Green
266819a1f5 client: avoid possible NULL deref on error path
https://github.com/warmcat/libwebsockets/issues/672
2016-12-12 20:38:32 +08:00
daren-qterics
e618359d4f ssl destroy: change ordering of ssl destroy to later than vhost destroy
https://github.com/warmcat/libwebsockets/issues/711
2016-12-10 09:13:08 +08:00
Andy Green
04fee5f75f clean: usused accidental global wsi
https://github.com/warmcat/libwebsockets/issues/708
2016-12-10 09:13:08 +08:00
Andy Green
384ee53a36 lwsgt: fix check against forgot password flow defeating existing pw check
https://github.com/warmcat/libwebsockets/issues/706

This fixes a problem where the check for the existing pw was
skipped when a logged-in user is changing his password.

It's not good but because the user has to be logged in, it only affected
the situation someone changes his password on his logged in session.
2016-12-10 09:13:08 +08:00
Bablooos
c01bbb2bbc Update CMakeLists.txt for BSD + libdl
Fixing build failure of libwebsockets-test-fraggle  on FreeBSD when LWS_WITH_PLUGINS.
Solution: FreeBSD has no libdl
2016-12-10 09:13:08 +08:00
Andy Green
d104d624ec ws-server: restrict returned Sec-Websocket-Protocol to the chosen name only
https://libwebsockets.org/pipermail/libwebsockets/2016-November/002948.html

Updated to fix a problem with no protocol

https://github.com/warmcat/libwebsockets/issues/705
2016-12-10 09:13:04 +08:00
Andy Green
60b3a027d9 generic-sessions: move auth level check to after mount protocol selection 2016-11-26 20:47:34 +08:00
Iblis Lin
c8bb24cf57 server: portable option for setsockopt
From linux ipv6(7) manual (section `Note`):

        SOL_IP, SOL_IPV6, SOL_ICMPV6 and other SOL_* socket options are
        nonportable variants of IPPROTO_*.  See also ip(7).

Ref: http://man7.org/linux/man-pages/man7/ipv6.7.html
2016-11-23 23:40:04 +08:00
sjames1958gm
0bef3a8b01 client stash: update path variable to larger size 2016-11-22 09:01:57 +08:00
Andy Green
c2cd260311 lws_socket_bind: use lws_sockfd_type 2016-11-16 09:00:45 +08:00
Andy Green
386bd4550b client: protect againt losing ah by lws_client_connect_2 2016-11-15 17:00:55 +08:00
Andy Green
56826dbfd7 post file upload: dont lose sight of end of upload just because we hit end of incoming post data 2016-11-14 18:16:36 +08:00
Rainer Poisel
9d061e1efd Better support for MINW32 2016-11-09 08:34:27 +08:00
Yannick Kiekens
1e2e150ec4 From 7f84bc3e864b52eb13c670362a4b53bc3505393e Mon Sep 17 00:00:00 2001
Subject: [PATCH] Fix typo in lws_create_context documentation
2016-11-03 17:57:13 +08:00
Andy Green
5fb327754a adjust_timeout: with default lws_plat_service_tsi allow beings passed 0 timeout
Some people are calling service with zero timeout, taking care of
not busywaiting by some other external arrangements.

Adapt the forced service signalling to survive this.
2016-10-10 23:21:48 +08:00
Joerg Pommnitz
e2fcb94147 some compilers need void param explicitly 2016-10-10 20:06:06 +08:00
Yuchen Xie
5df8bf9d83 Correct the library name of LIBHUBBUB_LIBRARIES
It should be `hubbub` in `find_library` to make the function work.
2016-10-10 20:03:53 +08:00
Andy Green
6670c6f953 docs: explain lws_write handling of truncated sends better 2016-10-08 18:09:18 +08:00
Denis Osvald
549b7ad023 publicly document lws_service_fd timeout servicing
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-10-07 17:35:12 +08:00
Denis Osvald
af8692e36f test-server-extpoll: add 1-per-second timeout servicing
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-10-07 17:35:08 +08:00
Denis Osvald
6b7f30ef64 test-server-extpoll: check for forced service before looping again
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2016-10-07 17:04:19 +08:00
Andy Green
73557509bd v2.1.0
Bump soname to 9
2016-10-07 03:19:50 +08:00
Andy Green
443b31d012 extpoll: expose forced service apis 2016-10-07 03:19:45 +08:00
Andy Green
8b0dd360aa update attack.sh
Lws cares about trailing \n on a lot of these tests now.  Make it check it still cares on one and remove
the trailing \n on the others.

There's 2 changes in the results about /..//?, it seems to apply / to uri arg 1.  But it doesn't seem
to make a problem so just adapt the results for now.
2016-10-06 20:41:29 +08:00
Andy Green
4cfe81dfba ubuntu: fix uv detection for lwsws 2016-10-05 14:00:55 +08:00