summaryrefslogtreecommitdiff
path: root/bmcweb_config.h.in
AgeCommit message (Collapse)AuthorFilesLines
2022-04-19Remove regex uses in event service and consolidateEd Tanous1-0/+1
As the patch at https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50994 can attest, parsing urls with a regex is error prone. We should avoid it where possible, and we have boost::urls that implements a full, correct, and unit tested parser. Ideally, eventually this helper function would devolve into just the parse_uri, and setting defaults portion, and we could rely on the boost::urls::url class to pass into things like http_client. As a side note, because boost url implements port as a proper type-safe uint16, some interfaces that previously accepted port by std::string& needed to be modified, and is included in this patch. Also, once moved, the branch on the ifdef for HTTP push support was failing a clang-tidy validation. This is a known limitation of using ifdefs for our code, and something we've solved with the header file, so move the http push enabler to the header file. Also note that given this reorganization, two EXPECT statements are added to the unit tests for user input behaviors that the old code previously did not handle properly. Tested: Unit tests passing Ran Redfish-Event-Listener, saw subscription create properly: Subcription is successful for https://192.168.7.2, /redfish/v1/EventService/Subscriptions/2197426973 Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ia4127c6cbcde6002fe8a50348792024d1d615e8f
2022-04-05Add new option for query parametersEd Tanous1-0/+3
Query parameters in their initial incarnation will likely have security consequences. For example, requesting ServiceRoot with expand depth 999 would likely run most BMCs out of memory. This isn't a good reason to keep those features out of master, as there are a number of services (webui-vue for example) that would like to test against them, and identify the weaknesses. The goal with this option is to allow users to test, so we can determine things like the max depth we should support, which query params have security consequences and how to mitigate them, and other testing. The end goal would be for this option to be enabled by default. If it's removed entirely would depend on the impacts of supporting query params and is something we will have to discuss at a later date. Tested: Code compiles. Use of this option is added in next patchset in series. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I93ff31c938e4be2d92eb07b59a3288f8bacde2ac
2021-06-22Fix include what you use in bmcweb_config.hEd Tanous1-0/+1
As part of rearranging include files, it was found that a couple files don't include what they use. bmcweb_config.h.in uses size_t, which isn't in cstdint, and a couple files use variables out of bmcweb_config.h, which it didn't include. Tested: Code compiles; No functional changes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I6d8f3617d10a30a1f0209e492841e9d3adc9c3f3
2021-02-22Change config file name to bmcweb_config.hEd Tanous1-0/+12
config.h is a generic filename, unprefixed by any sort of name, that other dependencies could use. Namely, nghttp2 uses an identical filename, which can cause issues with getting the right one. This commit renames that file to bmcweb_config.h to disambiguate it from generic config.h files. Tested: Compiled bmcweb and observed compile time params get applied. There are no defaults on any of this stuff, so there's no way to silently miss the config file. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I9a3e73c37161fa438c5612344dfb01f1f19aff2c