Commit Graph
1490 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) 661a5ee03c MHD_digest_auth_check(): used internal function to decode nc, fixed incorrect check
(should be 'ULONG_MAX', not 'LONG_MAX'), new check is more strict.
Function should be more secure now.
2016-04-12 14:36:16 +00:00
Evgeny Grin (Karlson2k) 8632cd8c4b MHD_digest_auth_check(): decode timestamp value by internal function, added error checking,
added buffer overrun checking.
digest auth now should be more secure
2016-04-12 14:36:14 +00:00
Evgeny Grin (Karlson2k) 095d09c986 mhd_str: added MHD_strx_to_uint32_(), MHD_strx_to_uint32_n_(), MHD_strx_to_uint64_() and
MHD_strx_to_uint64_n_() functions
2016-04-12 14:36:11 +00:00
Evgeny Grin (Karlson2k) 36d82b1a0d connection.c: used internal US-ASCII-only hex string -> value conversion 2016-04-12 14:36:09 +00:00
Evgeny Grin (Karlson2k) 665fd0c24a mhd_str: added hex string to value conversion functions 2016-04-12 14:36:06 +00:00
Evgeny Grin (Karlson2k) 6352a326c0 struct MHD_NonceNc: use uint64_t for counter.
This produce same result on all platforms.
2016-04-12 12:53:24 +00:00
Evgeny Grin (Karlson2k) 69a35bc3a0 connection.c: removed unused variable, silent compiler warning 2016-04-12 12:53:21 +00:00
Evgeny Grin (Karlson2k) 8107709672 mhd_str.c: cosmetics, corrected comments 2016-04-12 11:50:06 +00:00
Evgeny Grin (Karlson2k) dc854bdfcf mhd_str: refactored MHD_str_to_uint64() and MHD_str_to_uint64_n_() for simplification, more
error checking and optimization
2016-04-12 11:01:36 +00:00
Evgeny Grin (Karlson2k) 19a9f06eea mhd_str: fixed typo in comment 2016-04-11 20:09:39 +00:00
Evgeny Grin (Karlson2k) 3ccf5b0b34 parse_connection_headers(): fixed uploading by POST files larger then LONG_MAX 2016-04-11 20:07:39 +00:00
Evgeny Grin (Karlson2k) aff8b7214b mhd_str: added MHD_str_to_uint64_() and MHD_str_to_uint64_n_() functions for US-ASCII-only
operations, independently on locale
2016-04-11 20:07:36 +00:00
Christian Grothoff 3f856f555b -indent 2016-04-10 21:30:03 +00:00
Evgeny Grin (Karlson2k) 958b711b3b Corrected typos in comments 2016-04-10 20:24:40 +00:00
Evgeny Grin (Karlson2k) ff21b86d1a Use less locking with MHD_USE_THREAD_PER_CONNECTION.
Do not maintain global list out timeouts as each thread use individual timeout.
As result - global mutex is not acquired after each single send()/recv().
2016-04-10 19:12:37 +00:00
Evgeny Grin (Karlson2k) cf295a42e2 Silent compiler warning 2016-04-10 09:42:35 +00:00
Evgeny Grin (Karlson2k) ed74ec9db8 Releasing 0.9.49 2016-04-09 13:08:05 +00:00
Christian Grothoff 94c0fd7183 one variable per line 2016-04-08 19:04:01 +00:00
Evgeny Grin (Karlson2k) 085bc84505 Reworked calling shutdown() on connections:
Now called on all platforms (including W32), called only with SHUT_WR,
except in close_all_connections() where shutdown() called with SHUT_RDWR.
This should increase chances of graceful disconnection.
2016-04-08 18:40:58 +00:00
Evgeny Grin (Karlson2k) 1057677e86 connection.c: remove unneeded check in try_ready_normal_body() 2016-04-08 16:31:10 +00:00
Evgeny Grin (Karlson2k) 1476b01284 platform_interface.h: fix possible NULL pointer dereference on Win32 2016-04-08 16:31:08 +00:00
Evgeny Grin (Karlson2k) 1226d45eba Check result of snprintf() in basicauth.c and digestauth.c, log more errors 2016-04-08 16:31:05 +00:00
Evgeny Grin (Karlson2k) 6096c8a88e daemon.c: remove unused variable in MHD_handle_connection() 2016-04-08 16:31:03 +00:00
Evgeny Grin (Karlson2k) 6ec74bd8eb connection.c: fix using uninitialized variable in build_header_response() 2016-04-08 16:31:00 +00:00
Evgeny Grin (Karlson2k) e198febcf8 Fix testsuite compiler warnings on W32 2016-03-26 00:38:26 +00:00
Christian Grothoff c39414cdc7 Dan Dedrick wrote:
If pthread_create fails for some reason we need to not access the
thread pointer as it will not be valid. Without this check a failed
return code from pthread_create would cause a SIGSEGV to occur.

An instance that pthread_create could fail is if enough connections were
established that we ran out of space in our mapping to create another
thread stack. Specifically I have seen this occur with
systemd-journal-gatewayd where there was a bug with not releasing
connections after they had disconnected. I submitted a fix for that
here: https://github.com/systemd/systemd/pull/2287 but it would really
be best if libmicrohttpd didn't SIGSEGV under these conditions.
2016-03-15 20:54:16 +00:00
Christian Grothoff c932ba77fd fix unnecessary and potentially problematic use of eready DLL in thread-per-connection mode 2016-03-15 19:31:42 +00:00
Christian Grothoff 601164fa35 -fix as suggested by EG 2016-02-22 13:56:26 +00:00
Christian Grothoff dcde217787 -missunderstanding test... 2016-02-22 09:34:46 +00:00
Christian Grothoff 8eb1cd31f5 -these tests should pass even if we do not have listen-shutdown 2016-02-22 09:32:30 +00:00
Christian Grothoff 8d83647523 -check for versions, report tests as skipped if versions missmatch 2016-02-20 12:30:43 +00:00
Christian Grothoff a624909415 be more forceful about stopping test clients 2016-02-20 12:16:40 +00:00
Evgeny Grin (Karlson2k) 6bda5e7fa7 Added more detailed description for test_shutdown_select.c 2016-02-19 15:32:37 +00:00
Evgeny Grin (Karlson2k) e500b2830d Really fixed Makefile for poll test 2016-02-06 10:37:44 +00:00
Evgeny Grin (Karlson2k) 25da66197c fixed Makefile for poll test 2016-02-05 21:25:12 +00:00
Evgeny Grin (Karlson2k) 96010724e3 Added test for checking ability of shutdown() on socket to trigger poll() 2016-02-05 20:47:58 +00:00
Evgeny Grin (Karlson2k) bc162a8e85 Fixed test compilation warnings for native W32 x64 2016-02-05 20:47:54 +00:00
Christian Grothoff 868e81cb3d bracket correctly 2016-02-05 17:27:39 +00:00
Evgeny Grin (Karlson2k) b1625cb1af Faster drain pipes. 2016-02-05 13:15:18 +00:00
Evgeny Grin (Karlson2k) 51aba3944b Fixed MHD_pipe_drain_ with emulated pipes 2016-02-05 13:15:14 +00:00
Evgeny Grin (Karlson2k) 101e71a8cf Added some buffer overrun protection, fixed handling of misformed URI with spaces. 2016-02-04 11:44:04 +00:00
Christian Grothoff b2a05d373c trying to fix full signal pipe issue reported on ML 2016-02-03 14:43:27 +00:00
Evgeny Grin (Karlson2k) 6767963266 Fix running select() on W32 with empty fdsets - W32 return error if no socket is marked in fdsets. 2016-01-30 15:57:42 +00:00
Christian Grothoff a3bfa8a2d6 applying cosmetics patch #4137 2016-01-28 06:06:50 +00:00
Evgeny Grin (Karlson2k) 22392ce602 Added test for checking ability of shutdown() on socket to trigger select() 2016-01-25 14:17:43 +00:00
Christian Grothoff 3baed95b7d current zzuf no longer needs, and no longer supports '--' 2016-01-23 13:47:22 +00:00
Christian Grothoff b429ae31a2 -check rval 2016-01-23 13:09:48 +00:00
Christian Grothoff bb93b2b5c2 -avoid theoretical issue with error_count overflowing depending on libcurl errnos 2016-01-23 13:08:27 +00:00
Evgeny Grin (Karlson2k) 1e11762d5f Reworked code for using accept4(), epoll_create1() and socket() with SOCK_CLOEXEC, SOCK_NONBLOCK and EPOLL_CLOEXEC. On some systems SOCK_CLOEXEC, SOCK_NONBLOCK and EPOLL_CLOEXEC are defined as enum members with the same names so precompiler assume zero value of such macros. 2016-01-21 19:53:45 +00:00
Evgeny Grin (Karlson2k) dcebe56be1 Fixed making sockets non-blocking. 2016-01-21 17:37:41 +00:00