[cpp-sp] branch main updated: Stop guarding body transmission with content type.
Codeberg
noreply at shibboleth.net
Wed Aug 12 13:45:55 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository cpp-sp.
View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/e9bd2cb07f35ab025661a42f55ec4f0ce0bb0a73
The following commit(s) were added to refs/heads/main by this push:
new e9bd2cb0 Stop guarding body transmission with content type.
e9bd2cb0 is described below
commit e9bd2cb07f35ab025661a42f55ec4f0ce0bb0a73
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Wed Aug 12 09:45:42 2026 -0400
Stop guarding body transmission with content type.
---
shibsp/handler/impl/AbstractHandler.cpp | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/shibsp/handler/impl/AbstractHandler.cpp b/shibsp/handler/impl/AbstractHandler.cpp
index 22729e2b..a021e200 100644
--- a/shibsp/handler/impl/AbstractHandler.cpp
+++ b/shibsp/handler/impl/AbstractHandler.cpp
@@ -140,18 +140,13 @@ DDF AbstractHandler::wrapRequest(const SPRequest& request, const set<string>& he
in.addmember("port").integer(request.getPort());
in.addmember("content_type").string(request.getContentType().c_str());
if (sendBody && !strcmp(request.getMethod(), "POST")) {
- if (request.getContentType().find("application/x-www-form-urlencoded") != string::npos) {
- unsigned int postLimit = getUnsignedInt(RequestMapper::POST_LIMIT_PROP_NAME, request,
- RequestMapper::POST_LIMIT_PROP_DEFAULT, HANDLER_PROPERTY_FIXED | HANDLER_PROPERTY_MAP);
- if (postLimit == 0 || request.getContentLength() <= postLimit) {
- in.addmember("body").unsafe_string(request.getRequestBody());
- }
- else {
- request.warn("POST limit exceeded, ignoring posted data");
- }
+ unsigned int postLimit = getUnsignedInt(RequestMapper::POST_LIMIT_PROP_NAME, request,
+ RequestMapper::POST_LIMIT_PROP_DEFAULT, HANDLER_PROPERTY_FIXED | HANDLER_PROPERTY_MAP);
+ if (postLimit == 0 || request.getContentLength() <= postLimit) {
+ in.addmember("body").unsafe_string(request.getRequestBody());
}
else {
- request.warn("Content type not supported, ignoring posted data");
+ request.warn("POST limit exceeded, ignoring posted data");
}
}
in.addmember("content_length").longinteger(request.getContentLength());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list