instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
CppMicroServices__CppMicroServices__1204
CppMicroServices/CppMicroServices
1,204
defect
28f319493c5341a443667797189de1b725af9374
f83ee9901fd94d8104096277dc036c3d71fc0e19
Added new value move constructor and move assign operator
This allows values to be moved into an Any rather than copied. Also added a test case which counts the number of copies and moves that happen in some code and ensures that the totals are correct.
diff --git a/framework/include/cppmicroservices/Any.h b/framework/include/cppmicroservices/Any.h index 4e707d7f0..b0377baba 100644 --- a/framework/include/cppmicroservices/Any.h +++ b/framework/include/cppmicroservices/Any.h @@ -386,6 +386,19 @@ namespace cppmicroservices { } + /** + ...
2
2
0
[{"id": "G0", "claim": "The move constructor of the test helper MyType should be marked noexcept.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The move assignment operator of the test helper MyType should be marked noexcept.", "category": "mai...
null
CppMicroServices__CppMicroServices__1209
CppMicroServices/CppMicroServices
1,209
defect
2e77ec8e7a7b4db7f5f9b1a03891ab55a71fdab7
b4778a1b460a6115023a1aaa7438697c85230d11
Solve issue where many threads install the same bundles concurrently
We were not locking properly and were getting off by one errors for the file path and the actual installed bundle (alphabetically because it's using a multimap in BundleRegistry). This fixes that critical section. The new test fails ~80-90% of the time without this fix, but has not yet failed with the fix.
diff --git a/framework/src/bundle/BundleRegistry.cpp b/framework/src/bundle/BundleRegistry.cpp index c495a07ea..0660d882c 100644 --- a/framework/src/bundle/BundleRegistry.cpp +++ b/framework/src/bundle/BundleRegistry.cpp @@ -107,16 +107,18 @@ namespace cppmicroservices the iterators to be incorrect. */ ...
1
1
1
[{"id": "G0", "claim": "A regression test should be written to catch many threads installing the same bundles concurrently, ideally by dynamically generating thousands of bundle manifests in memory and calling BundleRegistry::Install with the generated manifest.", "category": "testing", "verdict": "supported", "priorit...
null
CppMicroServices__CppMicroServices__1219
CppMicroServices/CppMicroServices
1,219
defect
606033b5c3d6057b2d4bf36c4f2364e9455da683
e1ea4dc200c1b5d8a8db12c3a997e95b3ebf3b77
Fix issue with concurrent creation of `configuration`s to trigger `factoryInstance` and `bundle.stop`
This test failed ~100% of the time before the fix, with the ComponentManager throwing an uncaught exception because the `bundleContext` was bad in its constructor I ran it 5000 times after and it didn't fail. That being said, this feels a bit like a bandaid. I made this issue: https://github.com/CppMicroServices/Cpp...
diff --git a/compendium/DeclarativeServices/src/manager/ComponentFactoryImpl.cpp b/compendium/DeclarativeServices/src/manager/ComponentFactoryImpl.cpp index 989119164..1fafdc152 100644 --- a/compendium/DeclarativeServices/src/manager/ComponentFactoryImpl.cpp +++ b/compendium/DeclarativeServices/src/manager/ComponentFac...
4
1
0
[{"id": "G0", "claim": "The new test should replace the magic number 10 passed to AsyncWorkServiceThreadPool with a named constant.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The class dsGraph1Impl defines a default destructor but does not d...
null
CppMicroServices__CppMicroServices__1221
CppMicroServices/CppMicroServices
1,221
defect
7ac9e4d07f5fe28909db8f5dbd7ba0ea88fc7e37
ae7b842bbf5883bbdc8225c36362cbf8adede046
Increase floating point precision for anys
Increase floating precision from default (6) to 12.
diff --git a/framework/include/cppmicroservices/Any.h b/framework/include/cppmicroservices/Any.h index b0377baba..930572c65 100644 --- a/framework/include/cppmicroservices/Any.h +++ b/framework/include/cppmicroservices/Any.h @@ -37,16 +37,18 @@ DEALINGS IN THE SOFTWARE. #include <algorithm> #include <array> +#inclu...
3
3
0
[{"id": "G0", "claim": "The custom OStreamFormatGuard struct added for restoring stream state could just be a standard scope guard.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The three floating-point output bodies should use the DOUBLE_PRECISION cons...
null
CppMicroServices__CppMicroServices__1224
CppMicroServices/CppMicroServices
1,224
defect
322a486bc037708070201a7db822bce5ab033942
6d76e2b4d2c5c9d1460aaeb559189e13f0241bf2
Fix TSan reported data race and remove legacy GCC checks
Replaced the bRemoved boolean with std::atomic_bool in ServiceListenerHookPrivate for thread safety. Removed legacy GCC version checks and the US_TYPE_OPERATIONS_AVAILABLE macro from FrameworkTest.cpp, simplifying type trait tests.
diff --git a/framework/src/service/ServiceListenerHookPrivate.h b/framework/src/service/ServiceListenerHookPrivate.h index 5246feae7..63f2a0b9a 100644 --- a/framework/src/service/ServiceListenerHookPrivate.h +++ b/framework/src/service/ServiceListenerHookPrivate.h @@ -46,7 +46,7 @@ namespace cppmicroservices v...
1
1
1
[{"id": "G0", "claim": "The pull request adds std::atomic_bool without including <atomic>, producing a compile error (no type named 'atomic_bool' in namespace 'std').", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}]
null
CppMicroServices__CppMicroServices__1234
CppMicroServices/CppMicroServices
1,234
defect
b7847f715a3e3716354d7a988099050198c51e08
c3518ab5e5d9234f6f7235d3bfb2a991cb66bd3c
`getcomponentDescriptionDTOs` safety
Make sure we handle the case where a bundle has stopped so that exceptions don't fall out of SCR service.
diff --git a/compendium/DeclarativeServices/src/ServiceComponentRuntimeImpl.cpp b/compendium/DeclarativeServices/src/ServiceComponentRuntimeImpl.cpp index 90d512247..c8f814f1c 100644 --- a/compendium/DeclarativeServices/src/ServiceComponentRuntimeImpl.cpp +++ b/compendium/DeclarativeServices/src/ServiceComponentRuntime...
13
4
0
[{"id": "G0", "claim": "The file compendium/DeclarativeServices/test/gtest/TestInterfaces/Interfaces.hpp referenced by the include cannot be found by clang-tidy (compiler diagnostic).", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The test helper cl...
null
CppMicroServices__CppMicroServices__1238
CppMicroServices/CppMicroServices
1,238
defect
f71ad06d42ef5d44f7656d702bbf5c5a6332e274
1a49f7b8dc133452876b56c921aad230c0b50059
Concurrent access to coreInfo bundle
the running theory here is as follows: `coreInfo->bundle_` is read via `.lock()` in many places under only the ServiceRegistry lock, while `Unregister()` calls `bundle_.reset()` under `LockServiceRegistration()`. These are different locks, so concurrent `weak_ptr::lock()` and `weak_ptr::reset()` on the same object c...
diff --git a/framework/src/service/ServiceReferenceBasePrivate.cpp b/framework/src/service/ServiceReferenceBasePrivate.cpp index 031e8a850..0c8f3a574 100644 --- a/framework/src/service/ServiceReferenceBasePrivate.cpp +++ b/framework/src/service/ServiceReferenceBasePrivate.cpp @@ -71,7 +71,13 @@ namespace cppmicroservic...
3
2
0
[{"id": "G0", "claim": "The new concurrency test swallows exceptions with empty catch(...) blocks, which hides issues; the exceptions should be handled, re-thrown, or the catch avoided altogether.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "I...
null
CppMicroServices__CppMicroServices__1240
CppMicroServices/CppMicroServices
1,240
defect
f71ad06d42ef5d44f7656d702bbf5c5a6332e274
234680f9af4517d6f94aacd38d29b389a9cd2a27
fix for failed `serviceReferenceFromService`
`ServiceReferenceFromService` fails for services provided by a ServiceFactory `ServiceReferenceFromService` relies on `std::get_deleter<CustomServiceDeleter>` to recover the `ServiceReference` from a service `shared_ptr`. This works when a service is obtained via `undleContext::GetService<S>()`, because that path ...
diff --git a/compendium/DeclarativeServices/test/gtest/CMakeLists.txt b/compendium/DeclarativeServices/test/gtest/CMakeLists.txt index 63cbf162e..945da766b 100644 --- a/compendium/DeclarativeServices/test/gtest/CMakeLists.txt +++ b/compendium/DeclarativeServices/test/gtest/CMakeLists.txt @@ -92,6 +92,7 @@ set(_declarat...
17
5
1
[{"id": "G0", "claim": "The new test files include \"TestInterfaces/Interfaces.hpp\" and the clang analysis cannot find that header file, a clang-diagnostic-error in the added code.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "There are compiler e...
null
CppMicroServices__CppMicroServices__269
CppMicroServices/CppMicroServices
269
defect
db0fd1961264c706dc1d48d45e9df3e7a4d496c0
c3a72e8cd4ed9a0808151a21df1b72789a967542
Fix failure caused by permission issues in temp dir
Fix #266 by ignoring the exception thrown by the erstwhile GetFileStorage (renamed to GetPersistentStoragePath) Disable the creation of the "data" directory under the persistent storage directory when the framework starts Make minor refactoring changes Signed-off-by: The Mathworks Inc <Roy.Lurie@mathworks.co...
diff --git a/framework/src/bundle/CoreBundleContext.cpp b/framework/src/bundle/CoreBundleContext.cpp index 4bb0cf14a..97194d4e5 100644 --- a/framework/src/bundle/CoreBundleContext.cpp +++ b/framework/src/bundle/CoreBundleContext.cpp @@ -139,7 +139,15 @@ void CoreBundleContext::Init() // { // dataStorage = GetFile...
1
1
0
[{"id": "G0", "claim": "The ScopedFile helper should check the stream's failbit and fail the test if it is set.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CppMicroServices__CppMicroServices__306
CppMicroServices/CppMicroServices
306
defect
2ba8e4c7f957a0f3846217f2dd46090c93c6c34d
525cf78f7ce192ed629fa2fbaa213afe558b306f
Reduce peak heap memory utilization. Fixes #297.
This is a re-factoring of the BundleObj* classes which includes the ability to read the data section where the bundle's zip file is embedded using the link option. I removed one aspect of the original BundleObj* classes, which was to get the bundle name. I feel that this information is retrievable already and since ...
diff --git a/cmake/cppmicroservices_resources.rc.in b/cmake/cppmicroservices_resources.rc.in old mode 100644 new mode 100755 index 0d626d2b8..6db2478bc --- a/cmake/cppmicroservices_resources.rc.in +++ b/cmake/cppmicroservices_resources.rc.in @@ -1,4 +1,3 @@ -#define US_RESOURCE 200 -#define IDR_US_RESOURCE 101 +#...
13
12
1
[{"id": "G0", "claim": "Wrap the .us_resources buffer in a std::unique_ptr at the allocation site instead of malloc-ing it and wrapping it in a custom-deleter smart pointer after the if statement.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "U...
null
CppMicroServices__CppMicroServices__362
CppMicroServices/CppMicroServices
362
defect
66f9e1b9100f802c51fdce413515a3ebd77c5f37
697083736cb604a754bcd4e7257b1f61eab6cffb
Add benchmarks for ServiceTrackers
Signed-off-by: The Mathworks Inc <Roy.Lurie@mathworks.com>
diff --git a/framework/test/bench/CMakeLists.txt b/framework/test/bench/CMakeLists.txt index 85b99241c..6226f500b 100755 --- a/framework/test/bench/CMakeLists.txt +++ b/framework/test/bench/CMakeLists.txt @@ -14,6 +14,7 @@ include_directories( #--------------------------------------------------------------------------...
1
1
0
[{"id": "G0", "claim": "The dummy benchmark namespace should not be named googlebenchmark (please remove google from it).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CppMicroServices__CppMicroServices__466
CppMicroServices/CppMicroServices
466
defect
2d2f1e79c68232080192853194ef562875da5b7a
f2339caf5dd21e53aeadd4a6d947200ffafb6dd3
SharedLibraryException handling
SharedLibraryException handling per https://github.com/CppMicroServices/rfcs/pull/9
diff --git a/compendium/DeclarativeServices/test/CMakeLists.txt b/compendium/DeclarativeServices/test/CMakeLists.txt index 681267c13..e736c8567 100755 --- a/compendium/DeclarativeServices/test/CMakeLists.txt +++ b/compendium/DeclarativeServices/test/CMakeLists.txt @@ -46,6 +46,7 @@ endif() set(_declarativeservices_tes...
6
5
1
[{"id": "G0", "claim": "In the testDSBundleImmediateFalse test, Bundle::Start() should never throw, so the test should use ASSERT_NO_THROW instead of asserting nothing about the throw.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "SharedLibraryExceptio...
null
CppMicroServices__CppMicroServices__484
CppMicroServices/CppMicroServices
484
defect
a19b81040e8b156f30a04aab2ad0d1e09bebd71a
97162264706148064834ed7ad8d0cc78a52b7617
Fix data race in BundleRegistry::Install()
This PR addresses the data race currently in BundleRegistry::Install() which causes sporadic crashes (segfaults) when a large number of bundles are being installed at the same time. Performance benefits are exhibited in this change and significantly reduce the amount of time it takes to install all bundles when 2-4 thr...
diff --git a/framework/src/bundle/BundleRegistry.cpp b/framework/src/bundle/BundleRegistry.cpp index 1a6531c19..d301dca97 100644 --- a/framework/src/bundle/BundleRegistry.cpp +++ b/framework/src/bundle/BundleRegistry.cpp @@ -44,12 +44,14 @@ namespace cppmicroservices { // Helper class to ensure RAII for InitialBund...
2
2
0
[{"id": "G0", "claim": "The added comment \"trying to install this bundle simultaneously at the same time\" is redundant.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The comment should explain why the 'bundles' object is locked rather than only...
null
CppMicroServices__CppMicroServices__494
CppMicroServices/CppMicroServices
494
defect
193fe0855d754b92a32d1b79a4418e0078c03273
284121538d42c00423926e6a1bdc715ca5cdc45d
Support parentheses in LDAP query attribute value
- changed LDAPExpr implementation to account for parentheses in attribute value - added test cases Signed-off-by: Kevin Lee <kevinlee@mathworks.com> fixes #496
diff --git a/framework/src/util/LDAPExpr.cpp b/framework/src/util/LDAPExpr.cpp index ff1c875b0..7654bee3b 100644 --- a/framework/src/util/LDAPExpr.cpp +++ b/framework/src/util/LDAPExpr.cpp @@ -709,14 +709,23 @@ std::string LDAPExpr::ParseState::getAttributeName() std::string LDAPExpr::ParseState::getAttributeValue()...
4
3
1
[{"id": "G0", "claim": "The pull request should also include at least one test case that covers invalid (i.e. non-matching parenthesis) input.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "It seems the getAttributeValue loop can only exit by detecting ...
null
CppMicroServices__CppMicroServices__497
CppMicroServices/CppMicroServices
497
defect
193fe0855d754b92a32d1b79a4418e0078c03273
1a02a2571069c64a598931ff0c525ff4871ac929
ConfigAdmin Extra Tests
This PR introduces another ConfigAdmin test and makes it open source. Additionally, it fixes a Valgrind error which was present in TestMetadataParserImplV1.cpp
diff --git a/compendium/ConfigurationAdmin/test/CMakeLists.txt b/compendium/ConfigurationAdmin/test/CMakeLists.txt index b9110bc72..45892cf65 100644 --- a/compendium/ConfigurationAdmin/test/CMakeLists.txt +++ b/compendium/ConfigurationAdmin/test/CMakeLists.txt @@ -43,6 +43,7 @@ set(_configurationadmin_tests TestCMAc...
3
3
0
[{"id": "G0", "claim": "The test bundle code should not output messages (std::cout) during test runs because it clutters the logs.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The newly added TestManagedServiceFactory interface should be moved...
null
CppMicroServices__CppMicroServices__502
CppMicroServices/CppMicroServices
502
defect
21391587953379616e67e486405c72215957a157
bfbfbc6ad6492b0d92a05f7fd63f58d38004c77e
AnyMapTest migration to GTest
This PR migrates the AnyMapTest (originally found in the test driver) to the usFrameworkTests gtest suite. An existing test for the AnyMap already existed so the tests from the test driver were added to this existing suite.
diff --git a/framework/test/driver/AnyMapTest.cpp b/framework/test/driver/AnyMapTest.cpp deleted file mode 100644 index 7f6849dcd..000000000 --- a/framework/test/driver/AnyMapTest.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/*============================================================================= - - Library: CppMicroS...
2
2
1
[{"id": "G0", "claim": "The explanatory comment describing the AnyMap's JSON representation, present in the original test-driver test, should also be included in the migrated gtest.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ported test sh...
null
CppMicroServices__CppMicroServices__519
CppMicroServices/CppMicroServices
519
defect
f8ce77814c65eb8273823c7ca5df256ec9768956
8ca8a7fc6dfd0b9fe82ccb5cb7655b02ea02bfff
Test Lazy Loading of a Delayed Component
Updated to test lazy loading of a delayed component. Validations: - Validate the bundle is not loaded into the process before GetService is called. - Validate the bundle is loaded into the process once GetService is called. Signed-off-by: The MathWorks, Inc. aadityap@mathworks.com
diff --git a/compendium/DeclarativeServices/test/TestComponentLifecycle.cpp b/compendium/DeclarativeServices/test/TestComponentLifecycle.cpp index 7d14cc5ed..34583da1a 100644 --- a/compendium/DeclarativeServices/test/TestComponentLifecycle.cpp +++ b/compendium/DeclarativeServices/test/TestComponentLifecycle.cpp @@ -26,...
10
10
6
[{"id": "G0", "claim": "The module-handle array could be too small to hold all modules, so the code should verify on return that all of the modules were returned (and, per M016, call EnumProcessModules with a sufficiently large buffer instead of testing the size).", "category": "correctness", "verdict": "supported", "p...
null
CppMicroServices__CppMicroServices__524
CppMicroServices/CppMicroServices
524
defect
67668577493e0ab27442c46e1c09998ca172cf00
19b59b917af65fc835a84b4718c8b37a50ea3003
Test Dependency Injection
This test validates the dependency injection (constructor injection) when reference = true and inject-references = true for a component Changes: - Created new DS bundle 'TestBundleDSTOI18' - Added new test-Interface 'Interface3' - Added 'testDependencyInjection' testpoint to validate Constructor Injection Sign...
diff --git a/compendium/DeclarativeServices/test/CMakeLists.txt b/compendium/DeclarativeServices/test/CMakeLists.txt index 85e66a87f..4a30ae4d0 100755 --- a/compendium/DeclarativeServices/test/CMakeLists.txt +++ b/compendium/DeclarativeServices/test/CMakeLists.txt @@ -159,6 +159,7 @@ set(_test_bundles TestBundleDSTO...
8
8
0
[{"id": "G0", "claim": "The stray whitespace-only blank lines added in testImmediateComponent_LifeCycle are unnecessary and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The conditional body in the ServiceComponent18 construc...
null
CppMicroServices__CppMicroServices__525
CppMicroServices/CppMicroServices
525
defect
0def0955ce6282ac2b93c358ba99423f40414e4e
8d3c992fcfb9afb9a89ca62c86180d754b555416
Test Service Dependency with LDAPFilter
This test validates the Service Dependency with LDAPFilter, when reference = true and target is specified for a component. LDAP filter constrains the set of target services and only services that match this filter are bound to the component. Changes: - Created new DS bundle 'TestBundleDSTOI19' - Added 'testServic...
diff --git a/compendium/DeclarativeServices/test/CMakeLists.txt b/compendium/DeclarativeServices/test/CMakeLists.txt index 4a30ae4d0..85a5150a0 100755 --- a/compendium/DeclarativeServices/test/CMakeLists.txt +++ b/compendium/DeclarativeServices/test/CMakeLists.txt @@ -167,6 +167,7 @@ set(_test_bundles TestBundleDSTO...
1
1
0
[{"id": "G0", "claim": "Minor: the spacing is off on the new test::InstallLib line (a tab instead of spaces).", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
CppMicroServices__CppMicroServices__533
CppMicroServices/CppMicroServices
533
defect
03b44d2557693031af36da2a29219e0b082ad505
68e9991aa2afd2cd72a7aecf28a0d18c92a4212e
Remove Bundle Threads
This PR removes the BundleThread functionality from CppMicroServices. BundleThread.h, BundleThread.cpp, and ConcurrencyTest.cpp are removed from the repo.
diff --git a/CMakeLists.txt b/CMakeLists.txt index 73e8d3469..51d2198b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,8 @@ cmake_minimum_required(VERSION ${US_CMAKE_MINIMUM_REQUIRED_VERSION}) project(CppMicroServices VERSION ${_version}) +set(ENV{TSAN_OPTIONS} "suppressions=${CMAKE_CURRENT_SOURCE_DIR...
8
8
0
[{"id": "G0", "claim": "The anonymous MultiThreaded struct holding the bundleThreads lists in CoreBundleContext.h should be removed now that it is no longer referenced after the BundleThread removal.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim":...
null
CppMicroServices__CppMicroServices__536
CppMicroServices/CppMicroServices
536
defect
c6532a759bde8c2d763abf272313d2df52e989f9
1ae8f24450bcf5395850006ea9bb6a533de1fdf6
Add test to validate configuration update with modified method
This test validates that a service's configuration can be updated after the service is activated without deactivating and reactivating the service, when "configuration-policy" : "optional" and modified method is present Changes: - Created new DS bundle with configuration policy = optional, immediate =false - Added...
diff --git a/compendium/DeclarativeServices/test/CMakeLists.txt b/compendium/DeclarativeServices/test/CMakeLists.txt index f417619e0..bfdc1be17 100755 --- a/compendium/DeclarativeServices/test/CMakeLists.txt +++ b/compendium/DeclarativeServices/test/CMakeLists.txt @@ -86,6 +86,7 @@ set(_declarativeservices_tests Tes...
6
5
1
[{"id": "G0", "claim": "The service component should not be named the same as the bundle; rename it (e.g. ServiceComponentCA1) and store the implementation class name in a variable used throughout the test.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "...
null
CppMicroServices__CppMicroServices__568
CppMicroServices/CppMicroServices
568
defect
cfa3e4d032812d825ab5ed59ed1a51fa5f5db347
cc133d1d1eca29109b322d56b3fda923107a2a95
Add test for DS_configAdmin Operation Order
Changes: - Added testModificationBeforeDeactivation testpoint to verify that DS must complete modification before deactivation of a component - Added testModificationOrder testpoint to verify that DS must complete modification before another modification can be applied Signed-off-by: The MathWorks, Inc. <aadityap@...
diff --git a/compendium/DeclarativeServices/test/CMakeLists.txt b/compendium/DeclarativeServices/test/CMakeLists.txt index f837dcdfd..edd4f0b2d 100644 --- a/compendium/DeclarativeServices/test/CMakeLists.txt +++ b/compendium/DeclarativeServices/test/CMakeLists.txt @@ -93,6 +93,7 @@ set(_declarativeservices_tests Tes...
3
2
1
[{"id": "G0", "claim": "The Update call in testModificationBeforeDeactivation should follow the new future-returning Update API and wait on the returned future (auto fut = configuration->Update(props); fut.get();) as done in Patty's 'update methods to return future' changes.", "category": "design", "verdict": "opposed"...
null
CppMicroServices__CppMicroServices__589
CppMicroServices/CppMicroServices
589
defect
9db1747704e1d5b11ec980f9ca4f23f35a3aeda9
71c4f3bf7f537c8008e3a1166bc02c0330bc7b67
initial build and test workflow
moving from travis ci to github workflows and updating minimum compiler versions for linux Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml new file mode 100644 index 000000000..28329e02d --- /dev/null +++ b/.github/workflows/buildandtest.yml @@ -0,0 +1,52 @@ +name: BuildAndTest + +on: + push: + branches: [ development ] + pull_request: + branches: [ development ] ...
1
1
1
[{"id": "G0", "claim": "The workflow uses two \"$\" symbols in front of \"{{matrix.sharedlib}}\" (in the job name and the cmake configure line) where earlier in the line only one \"$\" is used in front of \"{{env.BUILD_TYPE}}\", which looks like a typo.", "category": "correctness", "verdict": "supported", "priority": "...
null
CppMicroServices__CppMicroServices__595
CppMicroServices/CppMicroServices
595
defect
c60b59b1e63a8ba4da6b93de34a55e6e58937de0
4994c4856df305160b5c6677ca8876a7c493cbe6
Migrate all the tests from Legacy Driver to Gtest
Changes: - Migrated remaining tests from driver to gtest - Deleted Legacy driver Signed-off-by: The MathWorks, Inc. aadityap@mathworks.com
diff --git a/framework/test/CMakeLists.txt b/framework/test/CMakeLists.txt index 142519793..a576a3252 100755 --- a/framework/test/CMakeLists.txt +++ b/framework/test/CMakeLists.txt @@ -1,4 +1,3 @@ add_subdirectory(bundles) -add_subdirectory(driver) add_subdirectory(gtest) add_subdirectory(bench) diff --git a/framewo...
2
2
1
[{"id": "G0", "claim": "The comment on the RegisterService call says to benchmark that call, but the call sits outside the timed `for (auto _ : state)` loop, so the comment is misleading about what is benchmarked.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G...
null
CppMicroServices__CppMicroServices__612
CppMicroServices/CppMicroServices
612
defect
9db1747704e1d5b11ec980f9ca4f23f35a3aeda9
41b647eda0821d9dfd79e984fab98662afce52a6
Fix deadlock in ConfigAdmin Update, UpdateIfDifferent and Remove
The Update, UpdateIfDifferent and Remove methods on Configuration objects send an asynchronous notification to all services that have published a ConfigurationListener interface. The asynchronous thread creates a std::future and saves it in a vector (incompleteFutures). A ConfigurationAdminImpl non-public method (W...
diff --git a/compendium/ConfigurationAdmin/CMakeLists.txt b/compendium/ConfigurationAdmin/CMakeLists.txt index d777d9136..ad0f927e0 100644 --- a/compendium/ConfigurationAdmin/CMakeLists.txt +++ b/compendium/ConfigurationAdmin/CMakeLists.txt @@ -31,7 +31,7 @@ if(MINGW) endif() usMacroCreateBundle(ConfigurationAdmin ...
4
2
0
[{"id": "G0", "claim": "The method name configurationEvent should have its first letter capitalized to match the formatting used throughout the codebase.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Asks why configurationEvent acquires a lock_gu...
null
CppMicroServices__CppMicroServices__613
CppMicroServices/CppMicroServices
613
defect
35c169a51340e630ef4b18d3f4db3537f5e47247
2fb8dc3fe016d32c9502bc2934263addfb2e1936
Fix bug when an AddingService method returns nullptr
Fixes #471 Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
diff --git a/framework/include/cppmicroservices/detail/BundleAbstractTracked.tpp b/framework/include/cppmicroservices/detail/BundleAbstractTracked.tpp index d3208c41b..15c1feaf5 100644 --- a/framework/include/cppmicroservices/detail/BundleAbstractTracked.tpp +++ b/framework/include/cppmicroservices/detail/BundleAbstrac...
1
1
0
[{"id": "G0", "claim": "Use `trackedItemIter->second` syntax instead of `(*trackedItemIter).second` when reading the tracked object in both Track and Untrack.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
CppMicroServices__CppMicroServices__632
CppMicroServices/CppMicroServices
632
defect
530fd3be032d468de69fb0a764ef42aed69f2bc0
a8d6e51977fb1671f9f839067459ebcb832fd719
Fix DS race condition caused by latch removal
Removing the latch from CCActiveState caused a race condition because a Deactivate wasn't waiting for prior Activate calls to complete. Restored the latch. Signed-off-by: The MathWorks, Inc. <pelliott@mathworks.com>
diff --git a/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp b/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp index f255eb0ea..50af89831 100644 --- a/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp +++ b/compendium/DeclarativeServices/src/ma...
4
4
2
[{"id": "G0", "claim": "latch.CountDown() in CCActiveState::Rebind should be enclosed in a detail::ScopeGuard to guarantee it is called in all exceptional cases.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The bare latch.CountDown() call in CCAct...
null
CppMicroServices__CppMicroServices__656
CppMicroServices/CppMicroServices
656
defect
166c6eecf323840196ac404cc32f570df3d632b0
71f93925404c1e6312845d468bc3c56be2c90cc8
Fixes #653, Ensure that any BundleContext functions do not segfault if the bundle context is invalid
- Fixes bug where any functions called on an invalid BundleContext() (if retrieved after the framework was shutdown) causes a segfault. - Fixes bug where BundleContext::GetServiceObjects() did not throw if the bundle context was invalid. - Added new test for verifying that BundleContext functions properly ...
diff --git a/framework/include/cppmicroservices/BundleContext.h b/framework/include/cppmicroservices/BundleContext.h index f594f1481..ef92d4598 100644 --- a/framework/include/cppmicroservices/BundleContext.h +++ b/framework/include/cppmicroservices/BundleContext.h @@ -641,6 +641,9 @@ class US_Framework_EXPORT BundleCon...
2
2
2
[{"id": "G0", "claim": "The doxygen comments in BundleContext.h need to be updated to indicate that the BundleContext functions now throw when the context is invalid.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The doxygen for GetServiceReferen...
null
CppMicroServices__CppMicroServices__658
CppMicroServices/CppMicroServices
658
defect
a240213a06871632a508390ce64535f0732a2459
7266fd8cb4d1ba264eb91a16b83b17143132df10
EventAdmin interface
# Description This PR introduces the EventAdmin interface (locally called EM). It follows the OSGi specification for EventAdmin: https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.event.html # Testing Information Tests have been added to the `compendium/EM` directory. These tests cover functionality p...
diff --git a/compendium/CMakeLists.txt b/compendium/CMakeLists.txt index 843d70392..a5713313e 100644 --- a/compendium/CMakeLists.txt +++ b/compendium/CMakeLists.txt @@ -8,4 +8,5 @@ add_subdirectory(ServiceComponent) add_subdirectory(DeclarativeServices) add_subdirectory(ConfigurationAdmin) add_subdirectory(CM) +add_...
28
22
1
[{"id": "G0", "claim": "The topic grammar documentation says a token matches one character of [A-Za-z0-9_.] but the regex in Event.cpp requires one or more, so the documented 'token := [A-Za-z0-9_.]' needs a '+' sign.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id"...
null
CppMicroServices__CppMicroServices__663
CppMicroServices/CppMicroServices
663
defect
47a3f922ca4b0954d5c576ae25009ac4e44afe4a
8cbfbc74cfd575f997f6b6f1d4508e75720b9a9b
Fix ListConfigurations returning empty config objects
Per OSGi standard, ListConfigurations should only return config objects containing properties (i.e. not an empty config). Signed-off-by: The MathWorks, Inc. <jdicleme@mathworks.com>
diff --git a/compendium/ConfigurationAdmin/test/TestConfigurationAdminImpl.cpp b/compendium/ConfigurationAdmin/test/TestConfigurationAdminImpl.cpp index 5514386d7..c473102d3 100644 --- a/compendium/ConfigurationAdmin/test/TestConfigurationAdminImpl.cpp +++ b/compendium/ConfigurationAdmin/test/TestConfigurationAdminImpl...
3
2
1
[{"id": "G0", "claim": "The BuildAndTestOnWindows build configuration failed on this pull request.", "category": "correctness", "verdict": "uncertain", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The pull request's fix is incomplete: the test was written but the bug of ListConfigurations returning ...
null
CppMicroServices__CppMicroServices__664
CppMicroServices/CppMicroServices
664
defect
47a3f922ca4b0954d5c576ae25009ac4e44afe4a
bcc2be3b6da2b0210de1e661f3744362b8e72820
Fix check-then-act race in GetServiceFromFactory
Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>
diff --git a/framework/src/service/ServiceReferenceBase.cpp b/framework/src/service/ServiceReferenceBase.cpp index 5c4e123ed..a710540bc 100644 --- a/framework/src/service/ServiceReferenceBase.cpp +++ b/framework/src/service/ServiceReferenceBase.cpp @@ -103,9 +103,9 @@ Bundle ServiceReferenceBase::GetBundle() const ...
1
1
0
[{"id": "G0", "claim": "Add braces to the single-line if statement in GetBundle(), following the project style of bracing even single-line ifs.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "pre_existing"}]
null
CppMicroServices__CppMicroServices__667
CppMicroServices/CppMicroServices
667
defect
47a3f922ca4b0954d5c576ae25009ac4e44afe4a
0d0ba977bb3dd0eecf52c9d3f6ae5814d54e331b
Fix bug in FindResources() for data-only bundles
When a bundle is installed with the optional manifest argument, the bundle isn't fopen'd automatically. In the case of data-only bundles, it is never fopen'd and the BundleResourceContainer is never initialized. A call to FindResources() on a data-only bundle who was installed via `InstallBundles()` with the optiona...
diff --git a/framework/src/bundle/BundleResourceContainer.cpp b/framework/src/bundle/BundleResourceContainer.cpp index 5b8fd8b28..cf6a21689 100644 --- a/framework/src/bundle/BundleResourceContainer.cpp +++ b/framework/src/bundle/BundleResourceContainer.cpp @@ -65,14 +65,7 @@ BundleResourceContainer::BundleResourceConta...
1
1
0
[{"id": "G0", "claim": "Since the method no longer only opens the container, it should be renamed (suggestion: OpenAndInitializeContainer) to describe its intent.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CppMicroServices__CppMicroServices__680
CppMicroServices/CppMicroServices
680
defect
805ebac003341c541ce233dae034fbb6b4550d68
da88127eeb9c442f51c4d3b199eab89ee65c876d
Integrate LogService into the core framework and add more detail to exception messsages
This PR integrates the LogService into the core framework for logging messages pertaining to shared library loading. As part of this, the shared library that was created for LogService has been removed and instead has been converted into a header-only component, similar to cm. More "events" or "actions" can be logge...
diff --git a/compendium/ConfigurationAdmin/CMakeLists.txt b/compendium/ConfigurationAdmin/CMakeLists.txt index b8333f033..a5b3c375e 100644 --- a/compendium/ConfigurationAdmin/CMakeLists.txt +++ b/compendium/ConfigurationAdmin/CMakeLists.txt @@ -43,7 +43,7 @@ usMacroCreateBundle(ConfigurationAdmin SYMBOLIC_NAME confi...
1
1
0
[{"id": "G0", "claim": "Add a log message when the shared library load throws an exception (e.g. \"Failed loading shared library for ...\") in the catch block, to complement the success-path logging the PR added there.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CppMicroServices__CppMicroServices__698
CppMicroServices/CppMicroServices
698
defect
a4bb5260c5ac9bac1fe7929d09aec4141a9336ff
4d28f22c3b300f950066a1ce6f7fb2a16acb4b09
Multiple services and factory services in bundle dependent on same configuration pid
Multiple services and service factories can be dependent on the same configuration object and should be notified if the configuration object changes. Right now only one will be notified. This pull request fixes this problem in Configuration Admin for any service implementing the ManagedService interface or the ManagedS...
diff --git a/compendium/ConfigurationAdmin/src/ConfigurationAdminImpl.cpp b/compendium/ConfigurationAdmin/src/ConfigurationAdminImpl.cpp index 021d1c1f9..aa5f459bc 100644 --- a/compendium/ConfigurationAdmin/src/ConfigurationAdminImpl.cpp +++ b/compendium/ConfigurationAdmin/src/ConfigurationAdminImpl.cpp @@ -599,28 +599...
5
5
1
[{"id": "G0", "claim": "The managed-service notify loop is written with a while plus repeated std::find_if, and the reviewer asks for a better standard-algorithms formulation (e.g. std::for_each) that eliminates the manual iterator manipulation and reduces the time complexity.", "category": "performance", "verdict": "s...
null
CppMicroServices__CppMicroServices__714
CppMicroServices/CppMicroServices
714
defect
a34977c5509389ac7caef650359ed2faa6b1fc26
2ad5edbae701534ba61c575db437cce8528cdbea
702 ServiceTracker GetTrackingCount() when opened and then closed
Ensure that the ServiceTracker::GetTrackingCount() method returns -1 if the tracker has been opened and then closed.
diff --git a/framework/include/cppmicroservices/detail/ServiceTracker.tpp b/framework/include/cppmicroservices/detail/ServiceTracker.tpp index b5596a2b8..5ebc1abd1 100755 --- a/framework/include/cppmicroservices/detail/ServiceTracker.tpp +++ b/framework/include/cppmicroservices/detail/ServiceTracker.tpp @@ -434,7 +434,...
1
1
0
[{"id": "G0", "claim": "In GetTrackingCount() the lock should not be acquired with the comma operator inside the condition; the Lock call should be pulled out as its own statement (between lines 436 and 437, per achristoforides' snippet) for readability.", "category": "maintainability", "verdict": "supported", "priorit...
null
CppMicroServices__CppMicroServices__728
CppMicroServices/CppMicroServices
728
defect
f024d142a28c67a99147bee2b8e6585789981f69
83e4e80e9e39d1748fd15bb406188397cd1f4752
Performance improvement from `brian-performance` branch
Signed-off-by: The MathWorks, Inc. <alchrist@mathworks.com>
diff --git a/framework/include/cppmicroservices/detail/Threads.h b/framework/include/cppmicroservices/detail/Threads.h index ad5e6d91f..0e878f90f 100644 --- a/framework/include/cppmicroservices/detail/Threads.h +++ b/framework/include/cppmicroservices/detail/Threads.h @@ -151,7 +151,7 @@ template<class MutexHost> clas...
4
4
3
[{"id": "G0", "claim": "The new reference-returning `Properties::Value` function should be named something more descriptive, e.g. `RefToValue` or `ValueByRef`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Changing the default locking strategy ...
null
CppMicroServices__CppMicroServices__731
CppMicroServices/CppMicroServices
731
defect
23cf347018a609bf1d39b01339206f189fc05e9e
4291023458c3299be50d5f11645712dc24d74035
Factory Configuration Bug Fix
When factory configurations are created before the bundle containing the factory component is installed and started, DS should find those configurations in the Configuration Admin repository and register them as part of the factory component startup. Signed-off-by The MathWorks, Inc. <pelliott@mathworks.com>
diff --git a/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp b/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp index cb96bbec0..48b89fffc 100644 --- a/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp +++ b/compendium/DeclarativeServices/src/ma...
5
5
2
[{"id": "G0", "claim": "In ComponentConfigurationImpl::Initialize, the new check should use `metadata->factoryComponentID.empty()` instead of comparing to \"\", inline with similar checks in the function and the generally preferred way to test an empty container.", "category": "maintainability", "verdict": "supported",...
null
CppMicroServices__CppMicroServices__794
CppMicroServices/CppMicroServices
794
defect
7cbb41c1761703eb6eb8ecfc8d495b77991ab7ac
b8538df17587efd45d3319c8fd126ad2fdd82eab
Nested ldap queries
This is a new algorithm for matching ldap values. It correctly deals with nested data. Performance appears to be equivalent to old flat implementation. Passes all tests. Issuing pull request for review.
diff --git a/framework/src/util/LDAPExpr.cpp b/framework/src/util/LDAPExpr.cpp index 73a3abf9d..99f0ca78d 100644 --- a/framework/src/util/LDAPExpr.cpp +++ b/framework/src/util/LDAPExpr.cpp @@ -31,21 +31,182 @@ #include "PropsCheck.h" +#include <algorithm> +#include <bitset> #include <cctype> #include <cerrno> #...
4
3
2
[{"id": "G0", "claim": "Test cases should be added that test the order of search for a scenario where a flat key (\"a.b\") and a nested path (\"a\": {\"b\"}) both exist.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "User-facing documentation describing...
null
CppMicroServices__CppMicroServices__813
CppMicroServices/CppMicroServices
813
defect
b2030d260e58b9128ce3a7a36fa617fad60a50b2
87ad262090f92b9e737843bd161c714d1693087b
Add benchmark test infrastructure to DS
This PR adds google benchmark test infrastructure to the DS test directory. Additionally, this PR refactors the directory structure of the existing "test" directory for DS to look like the "test" directory that 'framework' uses.
diff --git a/compendium/DeclarativeServices/test/CMakeLists.txt b/compendium/DeclarativeServices/test/CMakeLists.txt index 4b9021f9c..d9cbf7e90 100644 --- a/compendium/DeclarativeServices/test/CMakeLists.txt +++ b/compendium/DeclarativeServices/test/CMakeLists.txt @@ -1,308 +1,3 @@ -#-----------------------------------...
1
1
0
[{"id": "G0", "claim": "The _test_bundles list should be trimmed down to only the bundles and link-time dependencies needed right now (e.g. the dictionary and spell checker services are not required), growing later as more are added.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "i...
null
CppMicroServices__CppMicroServices__82
CppMicroServices/CppMicroServices
82
defect
341175fcb6ba5ebdacd481cc791debc6684113d0
769a2cdafc5cc644a96e2d6379e6baacd6533d1a
fix mac os x test failures
Fixes: #56 Signed-off-by: The MathWorks, Inc. Roy.Lurie@mathworks.com
diff --git a/.gitignore b/.gitignore index a83f7fbd2..bf32eb672 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,5 @@ core/examples/makefile/main ._* *.dylib *.xcconfig -*.pbxproj \ No newline at end of file +*.pbxproj +*.DS_Store diff --git a/CMakeLists.txt b/CMakeLists.txt index a4ac08c48..833c991e9 100644 --...
2
2
1
[{"id": "G0", "claim": "The -fvisibility-ms-compat workaround should be applied only to Clang on Mac OS X, not to Clang on non-Apple (Linux) platforms, so the condition should be if(APPLE AND (US_COMPILER_CLANG OR US_COMPILER_APPLE_CLANG)).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope":...
null
CppMicroServices__CppMicroServices__834
CppMicroServices/CppMicroServices
834
defect
426c60df534cf02bce15cf5720882a4e668b9f21
adb9b4932cb751711c64c973d2e7d1804fd7c2bf
ComponentManagermemory reallocation bug fix
The ComponentManagerImpl object contained a shared_ptr to the vector of all ComponentManagerImpl objects. When adding an item to this vector, the resizing of the vector caused a memory allocation error. Fixed by removing the vector from the ComponentManagerImpl object. Signed-off-by: The MathWorks, Inc. <pelliott@mathw...
diff --git a/compendium/DeclarativeServices/src/SCRBundleExtension.cpp b/compendium/DeclarativeServices/src/SCRBundleExtension.cpp index 96bbb459f..682b16d5e 100644 --- a/compendium/DeclarativeServices/src/SCRBundleExtension.cpp +++ b/compendium/DeclarativeServices/src/SCRBundleExtension.cpp @@ -73,8 +73,7 @@ namespace...
4
4
0
[{"id": "G0", "claim": "The loop variable `item` in the futures wait loop should be a const reference rather than a copy.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The std::vector of component managers in CreateFactoryComponent need not be owne...
null
CppMicroServices__CppMicroServices__863
CppMicroServices/CppMicroServices
863
defect
062fd47b2d91cc1764393b4b4bf412b421f4d4c4
f18cd7b51c1f42afab2f7067dcd2e062e3224b71
Fixes #852: adds a [[nodiscard]] to BundleContext::RegisterService
This change edits the BundleContext class to force the user to hold on to the `ServiceRegistrationU` object returned by `RegisterService`. This aims to change expected behavior for handling objects to, in the future, allow scoping rules to help determine the registered lifetime of services within the framework.
diff --git a/compendium/DeclarativeServices/test/gtest/TestServiceComponentRuntimeImpl.cpp b/compendium/DeclarativeServices/test/gtest/TestServiceComponentRuntimeImpl.cpp index 37f184b0e..d245b9008 100644 --- a/compendium/DeclarativeServices/test/gtest/TestServiceComponentRuntimeImpl.cpp +++ b/compendium/DeclarativeSer...
2
2
0
[{"id": "G0", "claim": "Use `emplace_back` instead of `push_back` when storing the registration results, to construct the element in-place for better performance.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `[[nodiscard]]` attribute on the ou...
null
CppMicroServices__CppMicroServices__871
CppMicroServices/CppMicroServices
871
defect
f244220f7a40a7c02d40b36aabf5dbb4140e9eac
33f812c4d068714d450d4c4583b497e68ade9e99
Adding support for multiple cardinality for service references.
This PR adds changes to enable multiple cardinality support for service references along with unit tests. It follows OSGi specification guidelines for the functional design implemented: [https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-reference.cardinality](url) Signed-of...
diff --git a/compendium/DeclarativeServices/src/manager/BindingPolicy.cpp b/compendium/DeclarativeServices/src/manager/BindingPolicy.cpp index 9fa1ef73e..70c224f1e 100644 --- a/compendium/DeclarativeServices/src/manager/BindingPolicy.cpp +++ b/compendium/DeclarativeServices/src/manager/BindingPolicy.cpp @@ -104,7 +104,...
17
14
4
[{"id": "G0", "claim": "The build failures shown in this PR, most of which look caused by the author's changes, need to be resolved.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The cardinality checks `mgr.metadata_.maxCardinality == 1` (and the m...
null
CppMicroServices__CppMicroServices__915
CppMicroServices/CppMicroServices
915
defect
4fded15af69c1b4ffd53c51d8eb857d4842d08dc
413339a03a0600c5be2f5d471cffd8e68b57c530
Fix #913 ServiceTracker deadlock
This fixes the deadlock in #913 caused by a waitForService call deadlocking as a result of the bundle being deleted while the tracker is waiting. As bundles do not have a way to access the tracker on destruction to wake it up, this implementation utilizes a time limit for the wait condition to ensure that the bundle...
diff --git a/framework/include/cppmicroservices/detail/ServiceTracker.hpp b/framework/include/cppmicroservices/detail/ServiceTracker.hpp index dfa1be535..8b56df961 100755 --- a/framework/include/cppmicroservices/detail/ServiceTracker.hpp +++ b/framework/include/cppmicroservices/detail/ServiceTracker.hpp @@ -263,7 +263,...
6
5
3
[{"id": "G0", "claim": "The `while (true)` loop is unnecessary and inefficient because of the 500ms wake-up interval in `WaitFor`; it should be replaced by checking `WaitFor`'s return value (`std::cv_status::timeout`) in the loop condition.", "category": "performance", "verdict": "supported", "priority": "P2", "scope":...
null
CppMicroServices__CppMicroServices__921
CppMicroServices/CppMicroServices
921
defect
4fded15af69c1b4ffd53c51d8eb857d4842d08dc
7beb38e297efc6c165fcb52b590fda5c9a959bd8
Fix Redundant Bundle Validation checks
Making independent TestBundles for all the test cases in `TestBundleValidation.cpp`
diff --git a/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp b/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp index b45b81afd..444de7441 100644 --- a/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp +++ b/compendium/DeclarativeServices/src/ma...
2
2
2
[{"id": "G0", "claim": "Consolidate the bundle validation with the existing bundle-loading bookkeeping in GetComponentCreatorDeletors instead of adding a second static map of validated bundle locations in ComponentConfigurationImpl, since the new `bundleValidated` set is redundant with `bundleBinaries` there.", "catego...
null
CppMicroServices__CppMicroServices__942
CppMicroServices/CppMicroServices
942
defect
fc006a89cc4c2b210baa71be47adc4676d2a441c
7cba777cffc26ca0952f36c73b8a478795f00a96
Initializer list support
All working now. AnyMap cache_bundle1 {{ {"a", std::string("A")}, // {"b", std::string("B")}, // {"c", std::string("C")} // }}; AnyMap o { AnyMap::ORDERED_MAP, {{ "do", 1 }, { "re", 2 }} };
diff --git a/framework/include/cppmicroservices/AnyMap.h b/framework/include/cppmicroservices/AnyMap.h index f49abbcb9..fa75e3120 100644 --- a/framework/include/cppmicroservices/AnyMap.h +++ b/framework/include/cppmicroservices/AnyMap.h @@ -24,7 +24,7 @@ #define CPPMICROSERVICES_ANYMAP_H #include "cppmicroservices/...
3
3
1
[{"id": "G0", "claim": "Add the missing space in the duplicated doc comment: 'of type \"type\"with' should read 'of type \"type\" with'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "The sentence 'with the content of the initialized with the cont...
null
CppMicroServices__CppMicroServices__943
CppMicroServices/CppMicroServices
943
defect
fc006a89cc4c2b210baa71be47adc4676d2a441c
4945c7bfc5c891b46af5effddaaaf4c5395f2238
Fix #937 `GetServiceReferences` ordering guarantee
This PR introduces two tests to guarantee that the ordering of services returned by `GetServiceReferences()` is ordered by rank. This was already the way the code was written, but now it can be guaranteed
diff --git a/framework/include/cppmicroservices/BundleContext.h b/framework/include/cppmicroservices/BundleContext.h index 3907f2c8f..5a6a8984e 100644 --- a/framework/include/cppmicroservices/BundleContext.h +++ b/framework/include/cppmicroservices/BundleContext.h @@ -429,7 +429,7 @@ namespace cppmicroservices ...
4
4
1
[{"id": "G0", "claim": "The ordering-by-rank wording the pull request adds should also be added to the documentation blocks of the GetServiceReferences overloads that it missed.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In verifyOrdering, the...
null
CppMicroServices__CppMicroServices__947
CppMicroServices/CppMicroServices
947
defect
1f729ee38f4d19dcdf4ef17bd02d112a0b4af82c
93ba590576ffba30d2eaf09fad60e44060320334
Fix GetBundleContext when using Declarative Services
Resolves issue #491 Described in https://github.com/CppMicroServices/rfcs/pull/20 Changes included in this MR: - Three new tests verifying bundle context consistency in DS - Three new bundles corresponding to these tests - `CPPMICROSERVICES_INITIALIZE_BUNDLE` is now added by the DS code generation tool - CMake...
diff --git a/cmake/usFunctionCreateTestBundle.cmake b/cmake/usFunctionCreateTestBundle.cmake index 1620e5aa8..e6db64acd 100644 --- a/cmake/usFunctionCreateTestBundle.cmake +++ b/cmake/usFunctionCreateTestBundle.cmake @@ -49,7 +49,7 @@ function(usFunctionCreateTestBundle name) endfunction() function(usFunctionCreate...
18
16
8
[{"id": "G0", "claim": "GetSymbol's std::string errmsg out-parameter should not be passed as a pointer; it should be passed by reference.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "std::atomic should be used instead of a std::mutex for the bundle-con...
null
CppMicroServices__CppMicroServices__983
CppMicroServices/CppMicroServices
983
defect
d73838818dc5af32c1ede4d08cd15720365902c3
6fbbeb3c306c251cb3463560d817ae8e213ae7ff
Ensure safe concurrent destruction of bundles and framework stopping
This addresses issues encountered when concurrently destroying bundles and stopping the framework. The solution was to allow a service to be already unregistered when the state was switching from active in the ComponentConfiguration.
diff --git a/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp b/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp index ca81c5232..618ccd565 100644 --- a/compendium/DeclarativeServices/src/manager/ComponentConfigurationImpl.cpp +++ b/compendium/DeclarativeServices/src/ma...
5
4
0
[{"id": "G0", "claim": "The `std::vector` in the TestConcurrentStop test should be marked `const`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The indexed for loop over `interfaces` should be a range-based for loop.", "category": "maintainabi...
null
CppMicroServices__CppMicroServices__985
CppMicroServices/CppMicroServices
985
defect
a5aeadd4ffb7e83e7bade4268dc17176d15d1208
18f4aa75fa5e6e95a95bb55217024bcb8909e28b
DS/CA race on creation of Configuration and ComponentConfigurationImpl
This fixes a race when you have a concurrent `Configuration` creation and the creation of a `ComponentConfigurationImpl` object that depends on that configuration. What happens is... in threadA: `compConfig->Initialize()` is called. This causes that config to register a listener for the configuration it depends ...
diff --git a/compendium/DeclarativeServices/src/ConfigurationListenerImpl.cpp b/compendium/DeclarativeServices/src/ConfigurationListenerImpl.cpp index a5ef98bef..f49aac230 100644 --- a/compendium/DeclarativeServices/src/ConfigurationListenerImpl.cpp +++ b/compendium/DeclarativeServices/src/ConfigurationListenerImpl.cpp...
7
7
2
[{"id": "G0", "claim": "The new local variable `changeCount_` should not use the trailing-underscore naming reserved for class fields, and the unusual initial value of -1 should be explained by a comment (or not be there).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}...
null
CraftsMan-Labs__SimpleAgents__13
CraftsMan-Labs/SimpleAgents
13
defect
753728199f51292f3011c84afe2a6c828d574cf7
1b440318033549f92d02f092c59a6092fe2d9659
Feat/yaml tool calling runtime
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Tool-calling for YAML workflows (multiple formats, tool-choice, roundtrips, global aggregation) and built-in subgraph/graph-calling support; configurable tool tracing modes. * **Documentation**...
diff --git a/Cargo.lock b/Cargo.lock index 526d4433..9aacc124 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,7 +15,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", + "getrandom 0.3.4", "o...
1
1
1
[{"id": "G0", "claim": "The code invokes custom_worker.execute(...) before confirming the requested tool_name is one of the configured request.tools (validation happens later), so a hallucinated or malicious tool name can trigger a custom worker's external side effects before being rejected; tool membership should be v...
null
CraftsMan-Labs__SimpleAgents__64
CraftsMan-Labs/SimpleAgents
64
defect
bccbfeb2889ad2ca5f6f2090b916d7fb2cb271cb
e1bdaefcd7dff4ea73dc0611d9fff16e8d98b02e
Feat/code review remediation multicommit
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Strict/lenient healing modes; parser max size/depth limits; incremental streaming array extraction * Typed workflow run outputs (status enum) and human-in-the-loop resume handling * Optional...
diff --git a/Cargo.lock b/Cargo.lock index a7df984c..7a6abf4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2350,6 +2350,7 @@ dependencies = [ "async-trait", "futures-core", "futures-util", + "rand 0.8.6", "serde", "serde_json", "simple-agent-type", @@ -2405,6 +2406,7 @@ dependencies = [ "simple-agents-pro...
25
1
1
[{"id": "G0", "claim": "Jitter is applied after the backoff cap in retry_delay, so with jitter enabled the effective retry delay can exceed max_backoff by up to 50% (e.g. a capped 10s delay can become 15s), violating the documented meaning of max_backoff; re-clamp after jitter or jitter within the bounded range.", "cat...
null
Crosstalk-Solutions__project-nomad__702
Crosstalk-Solutions/project-nomad
702
defect
8dcbf7dbcf317f56f63fc6a24ee525fc1084c0e4
9942598da20b9f3324e2e5067be4c60085b1f29e
fix(admin): only hide global map banner after download
## Summary - keep the global map download banner visible until the configured global map file actually exists on disk - add a small helper for checking the downloaded map inventory by filename - add focused regression coverage for the banner visibility helper ## Testing - npx tsx --test admin/tests/unit/global_map_ban...
diff --git a/admin/inertia/lib/global_map_banner.ts b/admin/inertia/lib/global_map_banner.ts new file mode 100644 index 000000000..4a2960490 --- /dev/null +++ b/admin/inertia/lib/global_map_banner.ts @@ -0,0 +1,10 @@ +export function hasDownloadedGlobalMap( + globalMapKey: string | null | undefined, + storedMapFiles:...
1
1
1
[{"id": "G0", "claim": "Because getGlobalMapInfo() returns only the latest PMTiles build key, hasDownloadedGlobalMap() should treat any stored global map file (e.g. an older YYYYMMDD.pmtiles build) as downloaded instead of requiring an exact key match, since global maps are large and rarely updated.", "category": "corr...
null
CrowCpp__Crow__1090
CrowCpp/Crow
1,090
defect
6dd8f00f555815962538e04a6ddc2dbc7c223d56
10f402268605fa255b050ae5c54c63b81d9ec47e
Isolate utility tests
Continued unittest.cpp refactoring by moving the six tests that depend only on the utility module into a separate ```test_utility.cpp```. ## Before refactor: ``` Filters: "base64","normalize_path","sanitize_filename","trim","string_equals","lexical_cast" Randomness seeded to: 1289970712 ========================...
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6164285a3e..8d8889659c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -19,11 +19,19 @@ CPMAddPackage(Catch2 enable_testing() +# Explicitly list the top-level test sources set(TEST_SRCS unittest.cpp query_string_tests.cpp ) ...
1
1
0
[{"id": "G0", "claim": "Replace the file(GLOB_RECURSE) globbing of unit test sources with an explicit file listing in tests/CMakeLists.txt.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CrowCpp__Crow__111
CrowCpp/Crow
111
defect
51a8a977d936902be859d80ccdf3217d15905f2e
ce7d08eb0ed418f4188644ba60c51e57b8b71b68
Fixed multiple definition issues
Multiple definition error fix: 1) Inlined functions that were not inlined 2) Added CROW_MAIN_ macro, which should be placed in main.cpp file. This macro helps avoid multiple definition error of static variables
diff --git a/Testing/Temporary/CTestCostData.txt b/Testing/Temporary/CTestCostData.txt new file mode 100644 index 0000000000..ed97d539c0 --- /dev/null +++ b/Testing/Temporary/CTestCostData.txt @@ -0,0 +1 @@ +--- diff --git a/Testing/Temporary/LastTest.log b/Testing/Temporary/LastTest.log new file mode 100644 index 0000...
3
3
0
[{"id": "G0", "claim": "The pull request commits generated test logs (Testing/Temporary/CTestCostData.txt, Testing/Temporary/LastTest.log) and they should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The file include/crow/tags appe...
null
CrowCpp__Crow__1134
CrowCpp/Crow
1,134
defect
0acad130efda02134a3ec7b36d66eb44ddbac226
6aa5076d7b9ec84f4091041758d9e532ad9de3de
Fix heap-buffer-overflow in query_string when parsing malformed '%'Fix heap-buffer-overflow in query_string for malformed '%'
This PR fixes the issue reported in #1126. Problem: Malformed percent-encoding (e.g. trailing '%') caused an out-of-bounds read in the query_string parser. Fix: Added bounds checking before decoding percent-encoded sequences to avoid reading past the buffer. Testing: - Reproduced crash with AddressSanitiz...
diff --git a/include/crow/query_string.h b/include/crow/query_string.h index a694b4caf3..9fb1ae8c0a 100644 --- a/include/crow/query_string.h +++ b/include/crow/query_string.h @@ -64,23 +64,33 @@ inline int qs_strncmp(const char * s, const char * qs, size_t n) if ( u1 == '+' ) { u1 = ' '; } if ( u1 =...
1
1
0
[{"id": "G0", "claim": "test_fix.cpp is only an intermediate debug file used to find the solution and should not be checked in (it should be deleted).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CrowCpp__Crow__1136
CrowCpp/Crow
1,136
defect
80ba18cdc4f6503888044b44b58a2bac17be82d2
6e5977fbb1a59d483f0a005eb1d8dec08f1e17dc
Protect websockets_ by mutex
We faced the situation, when ```std::vector<std::shared_ptr<websocket::connection>> websockets_``` will be modified in several threads in case of several simultaneous connections been opened and closed. To prove this and for future needs, we added ThreadSanitizer support (ENABLE_TSAN flag) and new test (multithreade...
diff --git a/CMakeLists.txt b/CMakeLists.txt index 21624dc681..5819254106 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ option(CROW_RETURNS_OK_ON_HTTP_OPTIONS_REQUEST option(CROW_ENABLE_SSL "Enable Crow's SSL feature for supporting https" OFF) option(CROW_ENABLE_COMPRESSION "Enable Crow's Compr...
1
1
1
[{"id": "G0", "claim": "ThreadSanitizer flags may not be supported on Windows / Visual Studio compilers, and gittiver asked whether the author knew.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
CrowCpp__Crow__117
CrowCpp/Crow
117
defect
5ab26078328dd884f247ee9feec6ca1c672b13cd
5f68479ee5333183e8d210cfabcdf2e3c9f972fd
`HEAD` and `OPTIONS` handling
This PR adds support for crow to automatically handle `HEAD` and `OPTIONS` methods. `HEAD` returns the same result as get, except the body is missing. `OPTIONS` returns a 204 response with an Allow header containing all the methods the specific route can use (or all the methods the *server* can use if the url is `h...
diff --git a/docs/guides/routes.md b/docs/guides/routes.md index a8d748130a..da8e816507 100644 --- a/docs/guides/routes.md +++ b/docs/guides/routes.md @@ -23,6 +23,10 @@ you can see the first `<int>` is defined as `a` and the second as `b`. If you we ##Methods You can change the HTTP methods the route uses from just ...
1
1
0
[{"id": "G0", "claim": "The new response members `head` and `no_length` have vague names and should be renamed to something clearer such as `is_head_response` and `add_automatically_content_length`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CrowCpp__Crow__126
CrowCpp/Crow
126
defect
1087c2fb12743e8c1c0dde620ba947c4ffc8d1ca
5f91587479e341445821fe8106b933f9c4df8cf1
Added Catchall route to Crow
Based on @Tibbel's work in #121 and #122. Main differences are: - Functionality is no longer enabled by a macro. - A macro similar to `CROW_ROUTE` is used (`CROW_CATCHALL_ROUTE`). - The lambda used can have no parameters, only request, only response, or both (similar to `CROW_ROUTE`). - Example is (in my opinion) s...
diff --git a/docs/guides/routes.md b/docs/guides/routes.md index da8e816507..977df25e1a 100644 --- a/docs/guides/routes.md +++ b/docs/guides/routes.md @@ -46,7 +46,7 @@ Alternatively, you can define the response in the body and return it (`#!cpp ([] For more information on `crow::response` go [here](../../reference/...
1
1
0
[{"id": "G0", "claim": "The typo in the static_assert message should be \"crow::resposne\" -> \"crow::response\".", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CrowCpp__Crow__205
CrowCpp/Crow
205
defect
a3ef00ff5b2d8861f1cbfa6e85db3f8d50207cee
576690bf14c5068ebcf40cf2416ff0a8906810b6
Send codes to catchall
- Made catchall work with 404 or 405 errors and made it way easier to implement it for other errors - snuck in a fix for release.py where version name wouldn't change - also snuck in slight improvement in finding blueprint (removed extra if statement) I wasn't sure whether it was a good idea or not to also use cat...
diff --git a/examples/example_catchall.cpp b/examples/example_catchall.cpp index 150ff3f72a..522812a542 100644 --- a/examples/example_catchall.cpp +++ b/examples/example_catchall.cpp @@ -11,10 +11,17 @@ int main() //Setting a custom route for any URL that isn't defined, instead of a simple 404. CROW_CATCHAL...
2
2
0
[{"id": "G0", "claim": "The duplicated get_found_bp calls inside the if-else branches of the blueprint search can be moved outside the if-else.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The error_message local in handle() should be const, a...
null
CrowCpp__Crow__278
CrowCpp/Crow
278
defect
22d39183450e6e5162aab376f4937ff887cd3c67
6458184e8f9261357c696d797041882b9ab5f2a2
Replace `dumb_timer_queue` with new `task_timer`
Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com> It fixes #264 and lays the ground for #273 and #257. This PR completely substitutes `dumb_timer_queue` for a new class named `task_timer`. The advantages include: - Ability to use a custom timeout for each task (function call) - Doesn't use a static ti...
diff --git a/include/crow.h b/include/crow.h index 93ca96d1ec..1687f96471 100644 --- a/include/crow.h +++ b/include/crow.h @@ -8,7 +8,7 @@ #include "crow/json.h" #include "crow/mustache.h" #include "crow/logging.h" -#include "crow/dumb_timer_queue.h" +#include "crow/task_timer.h" #include "crow/utility.h" #include...
3
2
1
[{"id": "G0", "claim": "It might be a good idea to inline methods like get_default_timeout() and set_default_timeout().", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "GCC gives a member-initialization reorder warning when compiling, apparently because ...
null
CrowCpp__Crow__28
CrowCpp/Crow
28
defect
f85e62f5de2b9a6d9038a44ec9e1d1e493f52108
019ead45e268a8f5229083fd489434fac069c002
Streaming response bodies
Basically, if a response is larger than 1MB, it gets streamed the same way a static file does, this makes it so large responses don't get the 5 second timeout normal responses get Note: this might be a problem when considering something like a DOS attack. Closes #16
diff --git a/include/crow/http_connection.h b/include/crow/http_connection.h index 2b92f01a47..0914b5e960 100644 --- a/include/crow/http_connection.h +++ b/include/crow/http_connection.h @@ -364,7 +364,8 @@ namespace crow private: - void prepare_buffers(){ + void prepare_buffers() + { ...
1
1
0
[{"id": "G0", "claim": "The `megabyte` constant should be renamed to something more meaningful, such as `RES_STREAM_THRESHOLD`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CrowCpp__Crow__299
CrowCpp/Crow
299
defect
503789151b2c62ff627cbf5a43ce9d1aa125e386
5c806252f06dbd5e1c8587fb0f7bff6dd6943a27
Mustache lambda support
This PR adds support for the optional mustache feature "Lambdas", including value expansion. It will most likely require extensive testing and review. fixes #36
diff --git a/docs/guides/templating.md b/docs/guides/templating.md index 92c982ecb5..cdf1952b38 100644 --- a/docs/guides/templating.md +++ b/docs/guides/templating.md @@ -15,7 +15,11 @@ The HTML page (including the mustache tags). It is usually loaded into `crow::mu For more information on how to formulate a template,...
1
1
0
[{"id": "G0", "claim": "In the json::type::Function case of include/crow/mustache.h, move the two differing output lines (escape(execute_result, out) at line 233 and out += execute_result at line 243) into the if-else and take the duplicated execute/render-while block out of both branches.", "category": "maintainabilit...
null
CrowCpp__Crow__321
CrowCpp/Crow
321
defect
986868507988f8913253a30b3e969233d52c3227
74e5fa8c871bd264058218feae638bf21e2b20d3
Improve sanitize_filename
The old sanitize_filename implementation copied the string unconditionally, and then did multiple passes over the string to detect Windows special device files. This implementation now keeps the string in place and finds all special devices in a single pass. The separate commit for catch.hpp is required to build Cro...
diff --git a/include/crow/utility.h b/include/crow/utility.h index fa7edb2e55..782804971c 100644 --- a/include/crow/utility.h +++ b/include/crow/utility.h @@ -9,8 +9,6 @@ #include <string> #include <unordered_map> -#include <boost/algorithm/string.hpp> - #include "crow/settings.h" namespace crow @@ -627,125 +62...
2
1
0
[{"id": "G0", "claim": "Catch2 should be updated to a newer version rather than modified with a patch, as the PR's second commit does.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "unclear"}, {"id": "G1", "claim": "It may be better if the counter variables `i` and `len` in sanitiz...
null
CrowCpp__Crow__33
CrowCpp/Crow
33
defect
6cf701b113c87633185e586cd767e599feaef45d
4f7411d1aaf1cf1e4b9efad3252c2f91a9a22e87
Stream fixes
This PR adds a specific method to stream a string (rather than an input stream) and makes it so that the test for body streaming actually tests the streamed data (or at least a part of it). This should reduce memory usage from `body*2` at all times (when the body is streamed) to `body` at the start, decreasing to `0...
diff --git a/include/crow/http_response.h b/include/crow/http_response.h index 6f87e80651..c349c8c54d 100644 --- a/include/crow/http_response.h +++ b/include/crow/http_response.h @@ -184,8 +184,7 @@ namespace crow { if (body.length() > 0) { - std::istringstream is(body)...
2
2
1
[{"id": "G0", "claim": "In write_streamed_string, buf is needlessly reset to a new empty string immediately before being assigned is (a leftover debugging line).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The stream test shows the body data ...
null
CrowCpp__Crow__348
CrowCpp/Crow
348
defect
4a6d5fe74c05d87ba8742a90666dce565848fbe3
5f105aca3724c9f92d9343044a4905a7c89ff8ae
CORS Middleware
Hi! I've implemented middleware for supporting CORS headers like discussed [here](https://github.com/CrowCpp/Crow/issues/224). ### What it looks like CORSHandler is responsible for setting headers in after_handle. By default, it already enables CORS after being included as a middleware. The global rules and rules...
diff --git a/examples/middlewares/cors.h b/examples/middlewares/cors.h new file mode 100644 index 0000000000..c200dc266d --- /dev/null +++ b/examples/middlewares/cors.h @@ -0,0 +1,33 @@ +#include "crow.h" +#include "crow/middlewares/cors.h" + + +int main() +{ + // Enable CORS + crow::App<crow::CORSHandler> app; +...
4
4
0
[{"id": "G0", "claim": "The CORSHandler API could use a more flexible builder so several prefix rules can be chained on one expression.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The rfind(rule.first, 0) idiom should get a comment explaining it is a ...
null
CrowCpp__Crow__403
CrowCpp/Crow
403
defect
03f2e266c15691cde0461ca72d1312c13ca93b42
d86b2d36f19fb19fdf3848359bf9db9b4393d420
Blueprint middleware
Hi! I've spent the last weekend experimenting with type quirks for middleware, but am happy to anounce that this one I found an unversal and simple solution for both handlers and blueprints. ## Goals 1. Support blueprint middleware with minimal friction with something like ```c++ Blueprint<Mw1, Mw2> bp; ``` ...
diff --git a/docs/guides/middleware.md b/docs/guides/middleware.md index e29aa6aba7..823db5aa2f 100644 --- a/docs/guides/middleware.md +++ b/docs/guides/middleware.md @@ -1,67 +1,76 @@ -Middleware is used for altering and inspecting requests before and after the handler call. +Middleware is used for altering and inspec...
3
3
0
[{"id": "G0", "claim": "The documentation should present the `response.end()` behaviour as an admonition, using `!!! note` or `!!! warning`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The note about local and global middleware call order shoul...
null
CrowCpp__Crow__409
CrowCpp/Crow
409
defect
db53bd619b51d4e45c03206adcb38eaf9683562a
1976b976b6236251961bd77621458623e510dfb1
Cookieparser attributes
Crows cookie_parser currently doesn't support setting any attributes on cookies (most importantly expires and path). I've added support for all available HTTP cookie attributes. This helps #406 Cookie parsers context allows now to set attributes in a builder style: ```c++ auto& cookie_ctx = app.get_context<cro...
diff --git a/include/crow/middlewares/cookie_parser.h b/include/crow/middlewares/cookie_parser.h index 3e5002db86..8da44b777b 100644 --- a/include/crow/middlewares/cookie_parser.h +++ b/include/crow/middlewares/cookie_parser.h @@ -1,4 +1,6 @@ #pragma once +#include <iomanip> +#include <boost/optional.hpp> #include <b...
5
4
0
[{"id": "G0", "claim": "The reviewer asks why set_cookie's value parameter is a template rather than just a string.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks that Cookie::format() be renamed to dump() to match the naming used elsew...
null
CrowCpp__Crow__411
CrowCpp/Crow
411
defect
db53bd619b51d4e45c03206adcb38eaf9683562a
33df7fc35b4a7fc0ea2343cae361aca0c487e60b
Handle unknown static file extensions
Fixes #410.
diff --git a/include/crow/http_response.h b/include/crow/http_response.h index 4ba400ba06..619accdf9b 100644 --- a/include/crow/http_response.h +++ b/include/crow/http_response.h @@ -246,13 +246,17 @@ namespace crow code = 200; this->add_header("Content-length", std::to_string(file_inf...
3
2
0
[{"id": "G0", "claim": "When a static file's path has no extension, the response sets Content-length but sends no Content-Type header.", "category": "correctness", "verdict": "opposed", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Look up the extension in the mime type map with find() instead of m...
null
CrowCpp__Crow__44
CrowCpp/Crow
44
defect
696fbb104369ee948b00274a5e7e677c405f460e
b54b5a4c6e5a251b71f47ffc008272546508c6e5
Websocket updates
This PR: - Documents `websocket.h` and adds websocket message structure illustration. - Cleans up a small problem with `app.h` documentation. - Adds support for non masked client messages. (closes #43) - Adds functionality to send a ping message from the server. - Exposes methods to send Ping and Pong to the end-u...
diff --git a/include/crow/app.h b/include/crow/app.h index e7969e1648..fe9c5e5d95 100644 --- a/include/crow/app.h +++ b/include/crow/app.h @@ -121,12 +121,12 @@ namespace crow ///Set the server's log level /// - /// Possible values are: - /// crow::LogLevel::Debug (0) - //...
1
1
1
[{"id": "G0", "claim": "In send_ping (and send_pong), the frame header is hand-built as char buf[3] = \"\\x89\\x00\" with buf[1] += msg.size(), so buf is not initialized with proper data and the payload length may not fit into that single byte for larger messages.", "category": "correctness", "verdict": "supported", "p...
null
CrowCpp__Crow__448
CrowCpp/Crow
448
defect
6f1baed6d36640bf36b10822fe8e65cd2fc75dd0
bd4f7cc84719abfca779f1603a40aa0fe1ba1147
Sessions Middleware
## Sessions This is the main implementation for #406 . I ended up focusing on backend storage only, making the design less flexible, but easier to use and implement. ### What made it into this version * First and foremost, it allows associating data with a client. The session is created on first write and is a...
diff --git a/docs/guides/included-middleware.md b/docs/guides/included-middleware.md index 19cf7f828e..03f00ce371 100644 --- a/docs/guides/included-middleware.md +++ b/docs/guides/included-middleware.md @@ -2,9 +2,78 @@ Crow contains some middlewares that are ready to be used in your application. <br> Make sure you u...
9
7
1
[{"id": "G0", "claim": "Consider combining rvalue and wvalue into a single class (e.g. 'rwvalue') instead of keeping separate JSON value classes.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "The session test should use the app's run_async() instead o...
null
CrowCpp__Crow__457
CrowCpp/Crow
457
defect
ed87c65c83bdc1c8b2604e6c328ae80dd85ccb61
111021add58ad333b8d16e8f62eaf3304aaf38b3
Deboostify Crow
This Pr removes `Boost` as a dependency and will instead rely on the standalone `asio` library. CI now installs `libasio-dev` instead of `libboost-all-dev` and the documentation resembles that change. (Although the MacOS section could use a double-check, I have no such device on hand) ### Proper testing necessary ...
diff --git a/CMakeLists.txt b/CMakeLists.txt index ecfa47781a..60fadf13a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,11 +53,13 @@ target_include_directories(Crow ) find_package(Boost 1.64 COMPONENTS system date_time REQUIRED) +find_package(asio REQUIRED) find_package(Threads REQUIRED) target_link_l...
3
1
0
[{"id": "G0", "claim": "string_equals should break out of the comparison loop as soon as a differing character is found instead of always scanning the whole string.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G11", "claim": "The code does not compile with GCC 4...
null
CrowCpp__Crow__499
CrowCpp/Crow
499
defect
e662a903a14f424a01e2f25879cbd180c1857c83
25c42adde7bd4eb79a71c12a8d216d72cdf15e28
Find the route as soon as the URL is parsed
the TL;DR is that this PR makes it so that a request is routed as soon as the URL is parsed. The long version is that it makes multiple changes to multiple parts of the framework, these changes are as follows: - Common - replaced the tuples in the router with `using routing_search_result` and `using routing_hand...
diff --git a/include/crow/app.h b/include/crow/app.h index 33c2ac3e18..851baa2320 100644 --- a/include/crow/app.h +++ b/include/crow/app.h @@ -76,10 +76,24 @@ namespace crow router_.handle_upgrade(req, res, adaptor); } - /// Process the request and generate a response for it - void...
3
1
0
[{"id": "G0", "claim": "The routing result should be structs instead of tuple aliases, so that fields can be read as res->routing_params rather than std::get<2>(var).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The explanatory comment above c...
null
CrowCpp__Crow__51
CrowCpp/Crow
51
defect
515fa68f67dbce3ce6c32e5144c50af75b9da909
5d23b2b9c7996e9ce5fa81aa91e52afd562b36fb
separated middlewares from core code
modified merge script to include middlewares, all are included by default include excludes everything else (items separated by ',') exclude only excludes selected items (items separated by ',') an item = middleware filename excluding `.h` closes #49
diff --git a/include/crow.h b/include/crow.h index b57bb6632e..ba5633ee59 100644 --- a/include/crow.h +++ b/include/crow.h @@ -16,7 +16,6 @@ #include "crow/parser.h" #include "crow/http_response.h" #include "crow/multipart.h" -#include "crow/middleware.h" #include "crow/routing.h" #include "crow/middleware_context...
4
3
0
[{"id": "G0", "claim": "Maybe rename include/crow to include/core.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "Move include/middlewares to include/core/middlewares (ultimately into the crow directory) to keep everything under one folder.", "c...
null
CrowCpp__Crow__524
CrowCpp/Crow
524
defect
fde74c4d2e66c76dbe288dfdf080ea1a09d28abd
0aa3ab94be66248ee33ad9f12a33521c65d8e376
Prevent HTTP pipelining
Fixes a potential use-after-free vulnerability where using HTTP pipelining could cause Crow to execute code related to a connection after deleting it. It also fixes a small bug where websocket connections could be established with invalid HTTP requests (ones that don't have a `Host` header) Thanks to hebi Gynvael...
diff --git a/include/crow/app.h b/include/crow/app.h index cb795fa71c..1c9d601c8d 100644 --- a/include/crow/app.h +++ b/include/crow/app.h @@ -375,6 +375,7 @@ namespace crow else #endif { + // TODO(EDev): Move these 6 lines to a method in http_server. std::vect...
1
1
1
[{"id": "G0", "claim": "Add a unit test that copies one of the websocket examples without the Host header, to check that the fixed error actually works in that case.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
CrowCpp__Crow__536
CrowCpp/Crow
536
defect
c0bfaa7709fe9698c0989788ddee6c2cdf254043
54524caf108427a978d76223d14a2214eaf968f9
Address #534 - handling missing mime types gracefully
Addresses #534. My first Crow PR! Please see the commit messages for the justification of my approach. I realise the addition of an additional header file might be controversial, but it seems to be the better of three evils.
diff --git a/include/crow/http_response.h b/include/crow/http_response.h index 130fed1fe0..8988762f9b 100644 --- a/include/crow/http_response.h +++ b/include/crow/http_response.h @@ -18,7 +18,7 @@ #include "crow/ci_map.h" #include "crow/socket_adaptors.h" #include "crow/logging.h" -#include "crow/mime_types.h" +#inc...
2
2
0
[{"id": "G0", "claim": "The mime validation and lookup helpers should live inside http_response.h (e.g. as a static private member) rather than in a separate mime_utils.h file.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request should not in...
null
CrowCpp__Crow__676
CrowCpp/Crow
676
defect
af6b7edc22199328d9cee29f21bac13bdfb262aa
ed4b6ee73716483a9fe10291b88e2709959cb8ff
Allow multiple executions of `validate()` (#672)
#672 I separated the different `validate()` responsibilities into other functions. It's now possible to execute `validate()` multiple times as it only performs validation. Is this proposed solution all right? If so I will proceed with writing the tests.
diff --git a/include/crow/app.h b/include/crow/app.h index 7b1513a730..7579380507 100644 --- a/include/crow/app.h +++ b/include/crow/app.h @@ -187,7 +187,7 @@ namespace crow bindaddr_ = bindaddr; return *this; } - + /// Get the address that Crow will handle requests o...
2
2
2
[{"id": "G0", "claim": "per_methods_[i].trie.add(...) in the recursive-child-methods branch of validate_bp() will keep adding routes if validate_bp() is called multiple times, because the same is_added guard used for rules is missing there.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope":...
null
CrowCpp__Crow__693
CrowCpp/Crow
693
defect
4f3f5deaaa01825c63c83431bfa96ccec195f741
b44310e179ca8cb3fe6d9a9f771249e15c4bcee9
#692 Add the possibility to specify "Sec-WebSocket-Protocol"
I took the liberty to add some documentation as well. Feel free if you have any feedback :)
diff --git a/docs/guides/websockets.md b/docs/guides/websockets.md index b09eb685b1..3ecbceba60 100644 --- a/docs/guides/websockets.md +++ b/docs/guides/websockets.md @@ -45,6 +45,11 @@ The maximum payload size that a connection accepts can be adjusted either global By default, this limit is disabled. To disable...
6
5
4
[{"id": "G0", "claim": "std::find_first_of is only available in C++17 or later, but Crow should also compile with C++11/14, so using it breaks those builds.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "A getter is needed on the connection so users...
null
CrowCpp__Crow__712
CrowCpp/Crow
712
defect
4f3f5deaaa01825c63c83431bfa96ccec195f741
6130f2ea1a61f7408201132045bc50f494763d10
fix: minimize the precision loss when dumping double to string
This PR fixes #711
diff --git a/include/crow/json.h b/include/crow/json.h index 3359a9cc07..357f16c0a4 100644 --- a/include/crow/json.h +++ b/include/crow/json.h @@ -1851,10 +1851,11 @@ namespace crow } f_state; char outbuf[128]; #ifdef _MSC_VER - sprin...
2
2
1
[{"id": "G0", "claim": "Do not reintroduce the MSC_COMPATIBLE_SPRINTF macro for this one-time use; keep the sprintf_s and sprintf calls inline with the new format string.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G5", "claim": "The template tests unit test fails b...
null
CrowCpp__Crow__790
CrowCpp/Crow
790
defect
ad337a8a868d1d6bc61e9803fc82f36c61f706de
d178be3dc1f3efcceb80b9b2a93242c6ba960250
Add option to use Boost.Asio
Closes #490 Add a cmake option CROW_USE_BOOST to link to Boost.Asio instead of standalone ASIO.
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6944e5e907..f02d9c489b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ option(CROW_BUILD_EXAMPLES "Build the examples in the project" ${CROW_I option(CROW_BUILD_TESTS "Build the tests in the project" ${CROW_IS_MAIN_PROJECT}) ...
2
1
0
[{"id": "G0", "claim": "The two GET_IO_SERVICE macro definitions in include/crow/socket_adaptors.h (the new CROW_USE_BOOST branch and the existing asio branch) should be combined into one.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Since the...
null
CrowCpp__Crow__854
CrowCpp/Crow
854
defect
045b17658546f01e38edbe69e27da10f50d1451c
f8456e83ce08753fc7df0c8a0bf64f43ddbd01b1
Make websocket close include the status code
In the websocket protocol the first two bytes of the payload in a close packet indicate the status code. :warning: This code is not backwards compatible, as I could not find how that is handled in this project. In the most extreme case we can use a std::enable_if on the onclose handler which then puts the status cod...
diff --git a/examples/websocket/example_ws.cpp b/examples/websocket/example_ws.cpp index 7079fa3439..670812f713 100644 --- a/examples/websocket/example_ws.cpp +++ b/examples/websocket/example_ws.cpp @@ -16,7 +16,7 @@ int main() std::lock_guard<std::mutex> _(mtx); users.insert(&conn); }) - ...
5
5
4
[{"id": "G0", "claim": "Close codes should be provided as an enumeration (including the default \"recommended\" codes) rather than only a raw uint16_t parameter.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Calling the close handler with status code 0 ...
null
CrowCpp__Crow__862
CrowCpp/Crow
862
defect
31ca14571678763313d9f4eaa53b049d4791a1e3
eba52c858ad80db03b62f64e864ce1267fda7a4b
Multipart message view
As discussed in #838, here's the prototype of the multipart message with 'view' semantics. It is written to allocate as little memory as possible (mainly vectors/maps for structuring message parts) and avoids copying the source request data, storing the views into it instead. I've mostly copied the interface of t...
diff --git a/CMakeLists.txt b/CMakeLists.txt index f411bd959f..ef41b175cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) endif() # Set required C++ standard -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQ...
3
2
2
[{"id": "G0", "claim": "The pull request fails compiling on macOS at least.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "merge_all.py trips on the comment after the #include \"crow/multipart.h\" line, and fixing that may be worth doing separately....
null
CrowCpp__Crow__897
CrowCpp/Crow
897
defect
dfbce12d2bbe341e260ef3df8f0d6e659af0e22c
f49a71aac2bf6a9b236e6ced4114b2cf5c8efc8c
Makes task_timer generic
This pull request attempts to solve #884 by making `taks_timer` generic and introducing `default_task_timer` and `milliseconds_task_timer`. `default_task_timer` just replaces all the previous instances of task timer, while `milliseconds_task_timer` replaces the use of `task_timer` in the test suite. Using this appr...
diff --git a/include/crow/http_connection.h b/include/crow/http_connection.h index 0bee101aef..c4090e6014 100644 --- a/include/crow/http_connection.h +++ b/include/crow/http_connection.h @@ -55,7 +55,7 @@ namespace crow const std::string& server_name, std::tuple<Middlewares...>* middlewares, ...
1
1
1
[{"id": "G0", "claim": "The tick length should be a constructor parameter of task_timer (with the templated duration code dropped), which is more flexible and allows units other than 1 for std::chrono::duration.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
CrowCpp__Crow__902
CrowCpp/Crow
902
defect
210cbfd58130237e1fabb88f070ef633d94d6cc2
6c76924ca426d5224098644c1c18c34f96ae92f5
Enable -Wshadow warnings
Shadowing variables makes it harder to understand whats happening. Enabled as warning and fixed all current violations.
diff --git a/cmake/compiler_options.cmake b/cmake/compiler_options.cmake index e7e5b19139..47c83fd961 100644 --- a/cmake/compiler_options.cmake +++ b/cmake/compiler_options.cmake @@ -20,6 +20,7 @@ function(add_warnings_optimizations target_name) -Wextra -Wpedantic -Wsuggest-override + ...
1
1
0
[{"id": "G0", "claim": "The to_hex helper lambda inside escape should be moved out into a small static inline function.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CrowCpp__Crow__931
CrowCpp/Crow
931
defect
bd61a7d1715f090b0b1b0c35e9e7f697aa42591b
f9d60d070415cd21540c6bffb8dd7e43238adc05
"crow::multipart::message throws when the boundary is empty or malformed
This is related to issue #916 where the multipart message causes a segmentation fault when a multipart request with an empty boundary is received. I added two throws to indicate whenever the boundary is empty or it could not be found/differs from the boundary inside the body. I hope these changes are enough to p...
diff --git a/include/crow/http_request.h b/include/crow/http_request.h index d1bcc8051d..d1f7865729 100644 --- a/include/crow/http_request.h +++ b/include/crow/http_request.h @@ -1,5 +1,6 @@ #pragma once +#include <stdexcept> #ifdef CROW_USE_BOOST #include <boost/asio.hpp> #else @@ -31,6 +32,15 @@ namespace crow ...
3
3
1
[{"id": "G0", "claim": "A multipart message with an empty or malformed boundary raises an exception that, if unhandled by the user's handler, becomes a 500 response, and it would be better to recognize a bad request exception in the default exception handler and respond with a 400.", "category": "correctness", "verdict...
null
CrowCpp__Crow__971
CrowCpp/Crow
971
defect
849eb87c02e8fb3fd50e690a2980877dfccfe86f
4ac4f033d51e820d598aa344d26c9e1f1a303b3f
Remove usage of deprecated Asio API
Remove all uses of deprecated Asio API, like `asio::io_service` and `asio::ip::address::from_string` (tested with compilation flag `ASIO_NO_DEPRECATED`) This automatically fixes building with newer versions of Boost Closes #970
diff --git a/include/crow/http_connection.h b/include/crow/http_connection.h index 1246fda8a3..b5d02f879b 100644 --- a/include/crow/http_connection.h +++ b/include/crow/http_connection.h @@ -50,7 +50,7 @@ namespace crow public: Connection( - asio::io_service& io_service, + asio::io_con...
2
1
0
[{"id": "G0", "claim": "The adaptor method get_io_service should also be renamed to get_io_context for consistency with the io_context rename.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR's inline endpoint creation in the Server constructor init...
null
CrowCpp__Crow__979
CrowCpp/Crow
979
defect
77eda0d6466721b5d0b48ada92d89481f510732e
61123ada1d7806732238022ec04d2d52c066761b
Credential is not supported if Allowed Origin is '*'
CORS disallows setting allowed origin to '*' when credentials are allowed This pull request sets allowed origin to client origin when credentials are allowed More info here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials
diff --git a/include/crow/middlewares/cors.h b/include/crow/middlewares/cors.h index ed8ae6782c..2756933876 100644 --- a/include/crow/middlewares/cors.h +++ b/include/crow/middlewares/cors.h @@ -118,15 +118,20 @@ namespace crow } /// Set response headers - void apply(crow::response& res) + ...
2
2
1
[{"id": "G0", "claim": "For consistency the middleware should use the crow::-qualified request and response types everywhere, as before_handle already does, instead of the unqualified ones after_handle was changed to.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"i...
null
CrowCpp__Crow__985
CrowCpp/Crow
985
defect
08f2b36223e25e82345169ad91c083e57e01d227
aca74a69f0c0ab6c75b366d43835291255b1cf9d
Fixed handling of origin when allow_credentials enabled
There are two things to start with: - OPTIONS requests are not expected to have `Origin` header. - OPTIONS responses are not expected to have an `Access-Control-Allow-Credentials` headers. - No response may have **both** `Access-Control-Allow-Credentials=true` and `Access-Control-Allow-Origin=*`. ([source](http...
diff --git a/include/crow/middlewares/cors.h b/include/crow/middlewares/cors.h index 3f89c81e33..5299c346bf 100644 --- a/include/crow/middlewares/cors.h +++ b/include/crow/middlewares/cors.h @@ -1,4 +1,5 @@ #pragma once +#include "crow/common.h" #include "crow/http_request.h" #include "crow/http_response.h" #includ...
1
1
0
[{"id": "G0", "claim": "The new if/else conditions for setting the CORS origin and credentials headers could be restructured (e.g. nested under allow_credentials_) so the logic looks less complicated.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
CrowdStrike__falcon-operator__467
CrowdStrike/falcon-operator
467
defect
f83a5a96587b600edde3d83e9df89d36ca8ab767
8e84a7259690cba13d176b90e99c38b3713b2a77
fixing the automatic proxy host config
Fixing #466 I've hesitated to put a if block to check if hasPrefix but I think it's cleaner to read. thoughts ?
diff --git a/pkg/common/common_test.go b/pkg/common/common_test.go index 7bee957ab..3f97b6918 100644 --- a/pkg/common/common_test.go +++ b/pkg/common/common_test.go @@ -175,3 +175,57 @@ func TestMakeSensorEnvMap(t *testing.T) { t.Errorf("MakeSensorEnvMap() = %v, want %v", got, sensorConfig) } } + +func TestMakeSe...
2
1
0
[{"id": "G0", "claim": "The new TestMakeSensorEnvMapWithAutomaticProxy test should be merged with the existing TestMakeSensorEnvMap test.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Instead of trimming the transport scheme later in MakeSensorEnvMap, ...
null
CrowdStrike__falcon-operator__560
CrowdStrike/falcon-operator
560
defect
01aee52947d9083fc4235f2f184045a0ad10235d
f4093219c46f44c840c4a17e19f24768ee20befd
fix: force the use of a single replica in FalconAdmission
Running the Falcon Admission Controller with more than one replica is not currently a supported configuration. This change locks the number of replicas at 1.
diff --git a/api/falcon/v1alpha1/falconadmission_types.go b/api/falcon/v1alpha1/falconadmission_types.go index 96a30e006..a019e2a68 100644 --- a/api/falcon/v1alpha1/falconadmission_types.go +++ b/api/falcon/v1alpha1/falconadmission_types.go @@ -99,14 +99,6 @@ type FalconAdmissionConfigSpec struct { // +operator-sdk:c...
1
1
1
[{"id": "G0", "claim": "Removing the `replicas` field from the FalconAdmission CRD while the operator is OLMv2 would break existing deployments, so this change cannot be merged unless either the admission controller handles the setting correctly in the first place or a CRD conversion webhook is added.", "category": "de...
null
CrowdStrike__falcon-operator__607
CrowdStrike/falcon-operator
607
defect
07e14c998ae056ec2cccd542b9b252a4938743ce
bf5a13f58b4dbe12ed32d8738fb9b3c1aacaa6b2
Update tolerations to accommodate an empty list
- Update tolerations to accommodate an empty list - Document the appending behavior of tolerations
diff --git a/api/falcon/v1alpha1/falconnodesensor_types.go b/api/falcon/v1alpha1/falconnodesensor_types.go index a99020181..ee0aff4d4 100644 --- a/api/falcon/v1alpha1/falconnodesensor_types.go +++ b/api/falcon/v1alpha1/falconnodesensor_types.go @@ -44,7 +44,7 @@ type FalconNodeSensorConfig struct { // Specifies toler...
2
2
1
[{"id": "G0", "claim": "The reviewer thinks Tolerations should not be made a required field (the pointer type without +optional makes it required).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer recommends wrapping the dereference in a funct...
null
CrowdStrike__falcon-operator__653
CrowdStrike/falcon-operator
653
defect
dc813727eb623171c9a965f8e9699e880a1abce4
5d654b8826ff4ea06db4c7ffc8a0b028c8710707
Add GKE AutoPilot labels to spec for troubleshooting WorkloadAllowlists
- Update the init args to match what we have in falcon-helm to ensure AllowlistWorkloads pass the validator - Add labels for troubleshooting the primary and cleanup daemonsets for AutoPilot. - Set configMap name to be a static value when Autopilot is enabled
diff --git a/api/falcon/v1alpha1/falconnodesensor_types.go b/api/falcon/v1alpha1/falconnodesensor_types.go index c8cdce384..80105444f 100644 --- a/api/falcon/v1alpha1/falconnodesensor_types.go +++ b/api/falcon/v1alpha1/falconnodesensor_types.go @@ -160,6 +160,14 @@ type AutoPilot struct { // +kubebuilder:default=fals...
5
5
0
[{"id": "G0", "claim": "The deployAllowList option should be abstracted to be simpler - either a boolean or only the allowlist version (e.g. deployAllowList: v1.0.2).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The documented option node.gke.deployAll...
null
CrowdStrike__falcon-operator__656
CrowdStrike/falcon-operator
656
defect
1c6b0508e1cd48e2e5abced30a35c4ba93206a00
feded00f3c83930f392f247e56458640500b1b0a
Add flag to disable the validating webhoook in falcon-kac
Adding the same functionality as: https://github.com/CrowdStrike/falcon-helm/pull/371
diff --git a/api/falcon/v1alpha1/falconadmission_types.go b/api/falcon/v1alpha1/falconadmission_types.go index 61dbcdd47..840967fd7 100644 --- a/api/falcon/v1alpha1/falconadmission_types.go +++ b/api/falcon/v1alpha1/falconadmission_types.go @@ -10,10 +10,11 @@ import ( ) const ( - DeployWatcherDefault = true - ...
8
6
2
[{"id": "G0", "claim": "The const-default-plus-pointer pattern is odd; making AdmissionControlEnabled a plain bool with a kubebuilder default would avoid the nil check (raised as an observation, not a blocker).", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim":...
null
CrowdStrike__falcon-operator__694
CrowdStrike/falcon-operator
694
defect
aa7112a8e02dd675cc098e7b9176d58605312b9c
38c6664824edefc054ce670ad059f534f50487fc
refactor: fix e2e test namespace conflicts
Refactoring for readability and so that the e2e tests stop failing when the falcon-system namespace fails to delete in a timely manner.
diff --git a/config/samples/falcon_v1alpha1_falconadmission.yaml b/config/samples/falcon_v1alpha1_falconadmission.yaml index 9b532329d..5dad47b03 100644 --- a/config/samples/falcon_v1alpha1_falconadmission.yaml +++ b/config/samples/falcon_v1alpha1_falconadmission.yaml @@ -9,7 +9,7 @@ metadata: crowdstrike.com/name...
3
3
0
[{"id": "G0", "claim": "The `command, action` pair in `manageCrdInstance` should be extracted into a dedicated type (with named apply/delete values) to make the method easier to understand and more flexible.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", ...
null
CrowdStrike__falconpy__113
CrowdStrike/falconpy
113
defect
3c02bacd41283892f9c36fdf9a818508208e10e6
ac66d88070711e78a94a8700af807c303cf262ad
Feature/sensordownloads
Sensor Download API calls Writing API calls for sensor downloads - [x] Enhancement - [x] Updated unit tests #### Unit test coverage ****working on getting these to pass with coverage, currently all are passing without but not with. Unsure why. ```shell COVERAGE RESULTS SHOULD BE POSTED HERE PLEASE REVIEW CONT...
diff --git a/.gitignore b/.gitignore index 0bf3bed8a..6c573822c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,8 @@ env/ .vscode/ build/ dist -falconpy.egg-info/ -__pycache__/ \ No newline at end of file +*.egg-info/ +sensor_downloads/ +__pycache__/ +.env +.coverage \ No newline at end of file diff --git a/src/...
8
8
1
[{"id": "G0", "claim": "The download directory should not be created before the API request; the makedirs/write code should be moved down below so it runs with the download step.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "DownloadSensorInstallerById ...
null
CrowdStrike__falconpy__1345
CrowdStrike/falconpy
1,345
defect
cd74c3277b81bbb089a96bbd5ef9db0f16599437
c6863d9c91491b60267e4cf7efa0cde7dd365c65
Version 1.5.2 - Operation updates, fixes
# FalconPy v1.5.2 This update provides 1 new operation, adds filter values and updates defaults in two operations, enhances the `import_definition` method within the __Workflows__ Service Class, and expands error handling when leveraging context handler functionality. Two bugs are also resolved. - [x] Enhancement ...
diff --git a/.github/wordlist.txt b/.github/wordlist.txt index 3934face8..4d49f71ca 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -1593,4 +1593,5 @@ executeactiverespondercommand combineddevicesbyfilter BCCA Sonoma -jbfuzier \ No newline at end of file +jbfuzier +agburch \ No newline at end of file...
1
1
1
[{"id": "G0", "claim": "The string \"api.crowdstrike.com\" is matched with a substring test against config.base_url, so it may match at an arbitrary position in the URL rather than only as the hostname (incomplete URL substring sanitization).", "category": "security", "verdict": "supported", "priority": "P1", "scope": ...
null
CrowdStrike__falconpy__546
CrowdStrike/falconpy
546
defect
d64dd3ef1649bce4e061312f60f87cf04da27ce2
4e83c341dc1fd740a5415df51ca882aaa56376a5
Fix of refresh_active_stream to support updating partition 0
## Fix of refresh_active_stream to support updating partition 0 Updated _util:process_service_request to fix the validation if partition was set, caused invalid url for partition 0 as would return false even when set and making the url not being formatted properly. Quite new to PR's ( and unit tests in general ) - ...
diff --git a/src/falconpy/_util.py b/src/falconpy/_util.py index e7e276ee0..0dd5b80c0 100644 --- a/src/falconpy/_util.py +++ b/src/falconpy/_util.py @@ -380,7 +380,7 @@ def process_service_request(calling_object: object, target_url = f"{calling_object.base_url}{target_endpoint[2]}" target_method = target_endp...
1
1
1
[{"id": "G0", "claim": "Changing the partition check to `isinstance(passed_partition, int)` alone breaks applications that pass the partition as a string (e.g. \"0\"), so the evaluation should be adjusted to handle both string and integer partitions (e.g. `if passed_partition or isinstance(passed_partition, int):`).", ...
null
CrowdStrike__terraform-provider-crowdstrike__176
CrowdStrike/terraform-provider-crowdstrike
176
defect
3bb27190a13f40a473d1605e26994a80373af283
4f1709a41cece0053167bec22a4fea892754e5df
feat: add s3 log ingestion method params
These changes implement AWS API support for S3-based log ingestion as an alternative to the default EventBridge method for AWS CloudTrail logs.
diff --git a/docs/resources/cloud_aws_account.md b/docs/resources/cloud_aws_account.md index 3e340439..cf9ef4e7 100644 --- a/docs/resources/cloud_aws_account.md +++ b/docs/resources/cloud_aws_account.md @@ -138,6 +138,11 @@ Required: Optional: +- `log_ingestion_kms_key_arn` (String) Optional KMS key ARN for S3 buc...
17
15
13
[{"id": "G0", "claim": "The new log_ingestion_s3/sns/kms attributes are marked Computed with a StaticString(\"\") default even though nothing useful is computed for them; they should be optional-only with validators enforcing the correct format when a value is provided.", "category": "design", "verdict": "supported", "...
null
CrowdStrike__terraform-provider-crowdstrike__265
CrowdStrike/terraform-provider-crowdstrike
265
defect
475c55584057cd8c8a7a7c6f05b34c9f0b8f704e
b3069884f532ae747996a4b78490fe137cc28991
feat(cloud-security): add `cloud_security_suppression_rules` data source
Requires gofalcon: https://github.com/CrowdStrike/gofalcon/pull/607
diff --git a/docs/data-sources/cloud_security_suppression_rules.md b/docs/data-sources/cloud_security_suppression_rules.md new file mode 100644 index 00000000..2de42e07 --- /dev/null +++ b/docs/data-sources/cloud_security_suppression_rules.md @@ -0,0 +1,110 @@ +--- +page_title: "crowdstrike_cloud_security_suppression_r...
4
3
1
[{"id": "G0", "claim": "Instead of non-nil checks in the pagination loop, the code should do nil checks and break out of the loop when the API returns an unexpected value, so the read does not get stuck in an endless loop.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"...
null
CrunchyData__pg_parquet__101
CrunchyData/pg_parquet
101
defect
3ff46d58d289c9953d6b64381614577a3ff3b08a
47d17cb98481f12114c26514290c205f10563003
Improved stats inspection
Previously, we printed column statistics for each column per row group via `parquet.metadata(uri)`. With the new udf `parquet.column_stats(uri)`, we print the column stats for each column aggregated by row groups. Stats for some of the types were printed in a text format that cannot be converted to actual Postgres t...
diff --git a/README.md b/README.md index cb35f31..c034492 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ COPY table FROM 's3://mybucket/data.parquet' WITH (format 'parquet'); - [Copy FROM/TO Parquet files TO/FROM Postgres tables](#copy-tofrom-parquet-files-fromto-postgres-tables) - [Inspect Parquet sche...
5
3
2
[{"id": "G0", "claim": "The file mixes import notations (plain crate names vs `::parquet`) and the reviewer asks what reason there is for the inconsistency.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer wonders whether a separate rol...
null