summaryrefslogtreecommitdiff
path: root/redfish-core/include/redfish.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2021-02-23 19:53:50 +0300
committerEd Tanous <edtanous@google.com>2021-02-24 00:29:16 +0300
commitfeaf15005555a3099c7f22a7e3d16c99ccb40e72 (patch)
tree70368fb1f8ba9a069cf4fa7724509309c6515a69 /redfish-core/include/redfish.hpp
parentb00dcc27587267e18d3abdee82f1ed7b39744d02 (diff)
downloadbmcweb-feaf15005555a3099c7f22a7e3d16c99ccb40e72.tar.xz
Fix XSS regressions
The router has an old sanity check in it to verify that nodes are simple. This is no longer the case, as we can have multiple, overlapping routes between different handlers, so non-simple root nodes are allowed. The commit here broke a couple things. 0260d9d6b252d5fef81a51d4797e27a6893827f4 First, when that route gets injected, the root node is no longer simple, as the first root in the trie can be a complex node. This should be ok, and this commit comments out the check. Also, because the meson node for the option was loaded directly into set10, instead of the boolean equivalent, the XSS feature always gets enabled, regardless of whether or not that's what the user wanted. The fix to this was to simply include a .enabled(), which correctly calls the bool. Tested: Built with insecure-disable-xss set, and observed crash was removed. Tried several routes including /redfish/v1 and observed them working. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib9fb55a61796ddbda65b7ee5d2803a5cbd2ae75f
Diffstat (limited to 'redfish-core/include/redfish.hpp')
0 files changed, 0 insertions, 0 deletions