-
Notifications
You must be signed in to change notification settings - Fork 192
Comparing changes
Open a pull request
base repository: etr/libhttpserver
base: feature/FEATURE-security-fixes
head repository: etr/libhttpserver
compare: master
- 10 commits
- 27 files changed
- 2 contributors
Commits on Feb 14, 2026
-
Merge pull request #366 from etr/feature/FEATURE-security-fixes
Fix 9 security vulnerabilities found in audit
Configuration menu - View commit details
-
Copy full SHA for 1a26dfc - Browse repository at this point
Copy the full SHA 1a26dfcView commit details
Commits on Feb 19, 2026
-
FEATURE-bauth-conditional-compile: Implementation complete
Add HAVE_BAUTH conditional compilation for basic authentication, mirroring the existing HAVE_DAUTH pattern. This allows libhttpserver to build against libmicrohttpd installations that lack basic auth support. Changes: - configure.ac: Auto-detect MHD_queue_basic_auth_fail_response, define HAVE_BAUTH flag and AM_CONDITIONAL, add to summary output - src/httpserver/basic_auth_fail_response.hpp: Guard with #ifdef HAVE_BAUTH - src/basic_auth_fail_response.cpp: Guard with #ifdef HAVE_BAUTH - src/httpserver.hpp: Conditionally include basic_auth_fail_response.hpp - src/httpserver/http_request.hpp: Guard get_user(), get_pass(), fetch_user_pass() declarations and username/password cache fields - src/http_request.cpp: Guard fetch_user_pass(), get_user(), get_pass() implementations and basic auth output in operator<< - src/httpserver/create_webserver.hpp: Guard basic_auth()/no_basic_auth() methods and _basic_auth_enabled member - src/httpserver/webserver.hpp: Guard basic_auth_enabled member - src/webserver.cpp: Guard basic_auth_enabled initialization - src/Makefile.am: Make basic_auth_fail_response conditional on HAVE_BAUTH - examples/Makefile.am: Guard basic_authentication and centralized_authentication examples behind HAVE_BAUTH - test/integ/authentication.cpp: Guard basic auth tests with HAVE_BAUTH - test/unit/create_webserver_test.cpp: Guard basic_auth builder test
Configuration menu - View commit details
-
Copy full SHA for 0908e48 - Browse repository at this point
Copy the full SHA 0908e48View commit details -
Add HAVE_BAUTH guards to remaining files missed in initial commit
Guard basic auth references in ws_start_stop.cpp, basic.cpp, create_test_request_test.cpp, create_test_request.hpp, and create_test_request.cpp that would fail to compile when libmicrohttpd lacks basic auth support.
Configuration menu - View commit details
-
Copy full SHA for 507d29a - Browse repository at this point
Copy the full SHA 507d29aView commit details -
Bump version to 0.20.0 and update ChangeLog
Add Version 0.20.0 header with bauth conditional compilation and security fix entries. Bump version in configure.ac to match.
Configuration menu - View commit details
-
Copy full SHA for ae59cc7 - Browse repository at this point
Copy the full SHA ae59cc7View commit details -
Merge pull request #367 from etr/feature/bauth-conditional-compile
Add HAVE_BAUTH conditional compilation for basic auth
Configuration menu - View commit details
-
Copy full SHA for 95d6df4 - Browse repository at this point
Copy the full SHA 95d6df4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68bff78 - Browse repository at this point
Copy the full SHA 68bff78View commit details
Commits on Feb 27, 2026
-
Add documentation and example for serving binary data from memory
The existing string_response already supports binary content (std::string can hold arbitrary bytes), but this was not documented or demonstrated anywhere. This gap caused users to believe a new response type was needed (see PR #368). - Add a note to the README's string_response description clarifying binary data support - Add a new "Serving binary data from memory" section with inline example - Add examples/binary_buffer_response.cpp as a complete, buildable example that serves a PNG image from an in-memory buffer - Register the new example in examples/Makefile.am https://claude.ai/code/session_01S3BvBrSoNvUhpYTyhPYCjJ
Configuration menu - View commit details
-
Copy full SHA for 97bd4b1 - Browse repository at this point
Copy the full SHA 97bd4b1View commit details -
Fix CI: add ChangeLog entry and missing include <utility>
Add ChangeLog entry for the binary buffer example to satisfy the ChangeLog Check workflow. Add missing #include <utility> for std::move to fix cpplint warning. https://claude.ai/code/session_01S3BvBrSoNvUhpYTyhPYCjJ
Configuration menu - View commit details
-
Copy full SHA for 6fa84e8 - Browse repository at this point
Copy the full SHA 6fa84e8View commit details -
Merge pull request #369 from etr/claude/review-pr-368-SXvkG
Add documentation and example for serving binary data from memory
Configuration menu - View commit details
-
Copy full SHA for 6c115f3 - Browse repository at this point
Copy the full SHA 6c115f3View commit details
Commits on Apr 8, 2026
-
Fix std::terminate when uri_log receives null uri (#371) (#372)
* Fix std::terminate when uri_log receives null uri pointer libmicrohttpd may invoke MHD_OPTION_URI_LOG_CALLBACK with a null uri pointer before the request line is parsed - for example on port scans, TLS clients hitting a plain HTTP port, or half-open connections. The previous code assigned the raw pointer directly into a std::string, which throws std::logic_error("basic_string::_M_construct null not valid"). Because the throw originates inside an MHD C callback with no enclosing handler, std::terminate() was called and the process aborted under load. Treat a null uri as an empty string so the assignment is well-defined. An empty URI fails to match any registered resource and surfaces as a 404, which is the correct graceful behaviour. Resolves #371. * ci(codeql): bump bundled libmicrohttpd to 1.0.3 The CodeQL workflow was still pulling libmicrohttpd-0.9.64 from S3, which is below the project's stated minimum of 1.0.0 and is no longer served by the bucket - the install step was failing with "gzip: stdin: not in gzip format" because curl received a 243-byte error response instead of the tarball. Bump to 1.0.3 from the same S3 location so CodeQL can build the project again. * ci: bump bundled libmicrohttpd to 1.0.3 in release and verify-build Aligns release.yml and verify-build.yml with codeql-analysis.yml so all workflows pull the same libmicrohttpd-1.0.3.tar.gz from S3. This also brings CI in line with the project's documented minimum of >= 1.0.0 (0.9.77 was below that threshold). Cache keys include the new version so existing 0.9.77 entries are not reused. * test: add unit test for uri_log null/empty/valid uri handling Adds test/unit/uri_log_test.cpp to lock in the fix for issue #371. The test calls uri_log() directly (re-declaring the symbol since it has no public header) and verifies three cases: - null uri does not throw and yields an empty complete_uri - valid uri is stored verbatim - empty uri is stored verbatim The first case is the regression check: against the unfixed code, running the test crashes the process (SIGSEGV from dereferencing the null pointer inside std::string's assignment operator on libstdc++ 13; on the older libstdc++ 10 from the bug report it threw std::logic_error and aborted via std::terminate). With the fix in place, all three sub- tests pass cleanly. The new test target needs an explicit -lmicrohttpd in its link line because it instantiates ~modded_request() directly, which references MHD_destroy_post_processor; the default LDADD only pulls libmicrohttpd in transitively via libhttpserver.la, and modern ld enforces --no-copy-dt-needed-entries. * test(uri_log): satisfy cpplint build/include_subdir for httpserver.hpp cpplint flags bare "httpserver.hpp" with build/include_subdir [4]. Match the convention used by every other test file in the repo and prefix the include with "./" so cpplint considers the directory explicit.Configuration menu - View commit details
-
Copy full SHA for a752404 - Browse repository at this point
Copy the full SHA a752404View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff feature/FEATURE-security-fixes...master