1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-08-17 22:21:06 +03:00
Commit Graph

1517 Commits

Author SHA1 Message Date
bel
ab3bc563cd Rewrite websocket for Lua (Step 9 of ?) 2014-05-24 00:14:37 +02:00
bel
6e8415d4e5 Rewrite websocket for Lua (Step 8 of ?) 2014-05-22 23:51:32 +02:00
bel
e2f8196be3 Rewrite websocket for Lua (Step 7 of ?) 2014-05-22 23:17:07 +02:00
bel
dbcae1b0e8 Rewrite websockets for Lua (Step 6 of ?) 2014-05-21 22:52:07 +02:00
bel
5d7c1d165b Rewrite websockets for Lua (Step 5 of ?) 2014-05-21 22:32:08 +02:00
bel
ed963c9793 Rewrite websocket for Lua (step 4 of ?) 2014-05-19 21:09:50 +02:00
bel
c9adad6e81 Rewrite websockets for Lua (Step 3 of ?) 2014-05-18 00:09:14 +02:00
bel2125
efa959642c Merge pull request #22 from dalgaaf/wip-da-sca-20140513
Fixes from clang scan-build
2014-05-13 19:03:30 +02:00
Danny Al-Gaaf
bedc028f38 civetweb.c: fix potential memory leak in set_ports_options
Free 'ptr' in case realloc was successful, but the next check fails.

Fix for clang scan-build report:

5886 if (!success) {

    35 Potential leak of memory pointed to by 'ptr'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 18:18:11 +02:00
Danny Al-Gaaf
1b5bac47c4 civetweb.c: remove some dead assignments related to 'sock'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 17:32:39 +02:00
Danny Al-Gaaf
7d7ec45f25 civetweb.c: remove dead assignemnt of 'keep_alive'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:54:14 +02:00
Danny Al-Gaaf
94e68b7348 civetweb.c: remove dead assignment of 'res' in match_prefix()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:51:37 +02:00
Danny Al-Gaaf
2d8fec839c main.c: fix another potential buffer overflow in strncat() call
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:45:22 +02:00
Danny Al-Gaaf
91f7daa9ed main.c: fix strncat call to prevent buffer overflow
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:43:28 +02:00
bel
429e051af8 Rewrite Lua Websockets (Step 2 of ?) 2014-05-12 22:01:26 +02:00
bel
5522ad9555 Rewrite websockets for Lua (Step 1 of ?) 2014-05-11 21:55:08 +02:00
bel
75aa590c04 Update release notes and credits 2014-04-29 20:21:57 +02:00
bel2125
76813c8d0b Merge pull request #21 from dalgaaf/wip-da-sca
Various fixes from SCA and Coverity
2014-04-28 23:29:14 +02:00
bel
3eecdd9370 Allow includes in htpasswd files 2014-04-28 23:12:35 +02:00
Danny Al-Gaaf
2e97ddc4db main.c: move 'guard' variable to _WIN32
Only needed in _WIN32 case. Otherwise unused.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-27 16:41:02 +02:00
Danny Al-Gaaf
6427a56977 civetweb.c: check for array boundry before read
Added assert to while loop to make sure not to read over the array boundry.

Fix for Coverity issue from Ceph project:

CID 1160832 (#1 of 1): Out-of-bounds read (OVERRUN_STATIC)
 37. overrun-local: Overrunning static array "buf", with 8192
 elements, at position 8192 with index variable "len".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-27 16:37:35 +02:00
bel
3b0ec24fa2 Show syntax errors in .htpasswd files 2014-04-24 22:55:17 +02:00
bel
4b0bfbb55b Error4xx page should be an error404 page. The error 403 (e.g., list a directory if enable_directory_listing no is configured) will show the error.lua page 2014-04-24 22:23:29 +02:00
Danny Al-Gaaf
8e2de6920c civetweb.c: use NULL for pointers
fix for cgcc warnings:

src/civetweb.c:5455:56: warning: Using plain integer as NULL pointer
src/civetweb.c:5696:28: warning: Using plain integer as NULL pointer
src/civetweb.c:5698:26: warning: Using plain integer as NULL pointer
src/civetweb.c:6456:34: warning: Using plain integer as NULL pointer
src/civetweb.c:6643:34: warning: Using plain integer as NULL pointer
src/civetweb.c:6811:29: warning: Using plain integer as NULL pointer

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 12:23:27 +02:00
Danny Al-Gaaf
ca9660e2fd main.c: use NULL for pointer
fix for cgcc warning:

src/main.c:238:48: warning: Using plain integer as NULL pointer
src/main.c:246:44: warning: Using plain integer as NULL pointer
src/main.c:418:17: warning: Using plain integer as NULL pointer

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 12:19:51 +02:00
Danny Al-Gaaf
afc9ec878e civetweb.c: change some local functions to static
Fix for cgcc warning:

src/civetweb.c:6189:22: warning: symbol 'mg_connect' was not declared.
  Should it be static?

src/civetweb.c:6743:6: warning: symbol 'get_system_name' was not declared.
 Should it be static?

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 12:15:42 +02:00
Danny Al-Gaaf
741fa81371 civetweb.c: check array limits before access array
[src/civetweb.c:3250]: (style) Array index 'i' is used before limits check.
[src/civetweb.c:3254]: (style) Array index 'i' is used before limits check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:52:01 +02:00
Danny Al-Gaaf
fdc0ed2689 civetweb.c: fix sscanf format string to %u
[src/civetweb.c:5728]: (warning) %d in format string (no. 2) requires
 'int *' but the argument type is 'unsigned int *'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:44:16 +02:00
Danny Al-Gaaf
23857b161d civetweb.c: fix format string from %d to %u
[src/civetweb.c:366]: (warning) %d in format string (no. 4) requires
 'int' but the argument type is 'unsigned int'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:42:10 +02:00
Danny Al-Gaaf
c4647ea6d3 civetweb.c: fix sprintf format specifier
Change %u to %lu and cast size_t to unsigned long to fix:

[src/civetweb.c:360]: (warning) %u in format string (no. 2) requires
 'unsigned int' but the argument type is 'size_t {aka unsigned long}'.
[src/civetweb.c:360]: (warning) %u in format string (no. 3) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:360]: (warning) %u in format string (no. 4) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:388]: (warning) %u in format string (no. 2) requires
 'unsigned int' but the argument type is 'size_t {aka unsigned long}'.
[src/civetweb.c:388]: (warning) %u in format string (no. 3) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:388]: (warning) %u in format string (no. 4) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:414]: (warning) %u in format string (no. 2) requires
 'unsigned int' but the argument type is 'size_t {aka unsigned long}'.
[src/civetweb.c:414]: (warning) %u in format string (no. 3) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:414]: (warning) %u in format string (no. 4) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:421]: (warning) %u in format string (no. 2) requires
 'unsigned int' but the argument type is 'size_t {aka unsigned long}'.
[src/civetweb.c:421]: (warning) %u in format string (no. 3) requires
 'unsigned int' but the argument type is 'unsigned long'.
[src/civetweb.c:421]: (warning) %u in format string (no. 4) requires
 'unsigned int' but the argument type is 'unsigned long'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:25:12 +02:00
Danny Al-Gaaf
9665010252 mod_lua.inl: Clarify expression with parentheses
Fix for:
[src/mod_lua.inl:899]: (style) Suspicious condition (assignment +
 comparison); Clarify expression with parenth

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:25:09 +02:00
Danny Al-Gaaf
d36e535c65 unit_test.c: fix printf, remove unused parameter
Fix for:
[test/unit_test.c:827]: (warning) printf format string requires 0
 parameters but 1 is given.
[test/unit_test.c:833]: (warning) printf format string requires 0
 parameters but 1 is given.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:25:05 +02:00
Danny Al-Gaaf
549631d9b1 CivetServer.cpp: check array limit before access array
Fix for:

[src/CivetServer.cpp:153]: (style) Array index 'i' is used before
limits check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:25:01 +02:00
Danny Al-Gaaf
0a5d4d2ffc civetweb.c: check array limit before access array
Fix for:
[src/civetweb.c:2338]: (style) Array index 'i' is used before limits check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:24:57 +02:00
Danny Al-Gaaf
a18401f0eb civetweb.c: fix realloc handling
Fix handling of realloc. If realloc() fails it returns NULL, assigning
the return value of realloc() directly to the pointer without checking
for the result will lead to a memory leak in error case.

Use a temporary pointer to hold the result of realloc().

Fix for:
[src/civetweb.c:409]: (error) Common realloc mistake: 'data' nulled but
not freed upon failure

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:24:52 +02:00
Danny Al-Gaaf
ae0c43a0e3 chat.c: fix format argument type
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:23:44 +02:00
Danny Al-Gaaf
92fcd83da3 main.c: fix -Wincompatible-pointer-types
Fix warning: passing 'char **' to parameter of type 'const char **' discards
qualifiers in nested pointer types [-Wincompatible-pointer-types]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:23:39 +02:00
Danny Al-Gaaf
69f2cf2481 .gitignore: add ctags file
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:23:27 +02:00
bel
8fbf4e94ce Add md5 test to unit test 2014-04-19 22:02:03 +02:00
bel
ca564eab93 Move windows console creation to a function 2014-04-18 23:09:02 +02:00
bel
de735c5544 Rewrite DEBUG_TRACE 2014-04-18 22:47:06 +02:00
bel
44ae1530bd handle exit while the password dialog is open, rewrite password suggestion 2014-04-16 17:55:34 +02:00
bel
8171e1bb03 Change password dialog for Windows 2014-04-16 15:01:03 +02:00
bel
0eee4c0bec Add the inl files to the Visual Studio project, so they can be conveniently opened from the Visual Studio IDE 2014-04-16 13:31:59 +02:00
bel
3a9aa9b80e Dialog to add and delete users and reset user passwords for Windows 2014-04-13 22:17:44 +02:00
bel
b5da6dbcaa Lua error handler for all errors 2014-04-11 22:08:24 +02:00
bel
93065f0278 Improve User Manual 2014-04-11 21:39:14 +02:00
bel
040946da87 Improve User Manual 2014-04-11 21:29:38 +02:00
bel
9ecfcb4a1e Improve User Manual 2014-04-11 20:50:27 +02:00
bel
6af6495617 Improve User Manual 2014-04-10 20:48:14 +02:00