- Issue created by @idimopoulos
- Merge request !29Issue #3394064: Prevent unsupported characters from being used in as subjects → (Merged) created by idimopoulos
- Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 8last update
about 1 year ago Not currently mergeable. - last update
about 1 year ago 15 pass, 4 fail - last update
about 1 year ago 16 pass, 2 fail - last update
about 1 year ago Build Successful - last update
about 1 year ago 16 pass, 1 fail - last update
about 1 year ago Build Successful - last update
about 1 year ago 71 pass - Status changed to Needs review
about 1 year ago 1:09pm 16 October 2023 - 🇬🇷Greece idimopoulos
So, the MR does:
* Prevent saving and loading entities when their subject contains unsupported characters.
* Prevent attempting to load entities in the router parameter converter class, when the passed URI contains unsupported characters. - 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺
I think this MR is fine as it is. The situation is actually that the module protects the backend from the entities having invalid IRIs described in the IS. The edge case is properly handled, i.e. it cannot happen via
SparqlEntityStorage
(neither load nor save).Maybe the throw exception can be added to the docblock of the corresponding
SparqlEntityStorageInterface
methods, but that's only a nit.The Kernel test additions are fine too.
My personal preference dictates that the method you test in ParamConverterTest (SparqlEntityStorageConverter::convert) should be set up in a way that it is able to return even an entity. So if I fix the entity definition param to be an array with the required key 'type', and then I add a valid entity to the test provider, then the test run must fail because convert returns with a non-null value. This might help to catch regressions in the future (or catch changes in upstream). But I repeat, this is only my preference. Attaching an oldschool diff as reference
- Status changed to RTBC
about 1 year ago 7:04am 18 October 2023 - 🇭🇺Hungary huzooka Hungary 🇭🇺🇪🇺
Sorry, forget to set the right issue status, but keep assignee.
- last update
about 1 year ago Build Successful - last update
about 1 year ago 71 pass - last update
about 1 year ago 71 pass -
idimopoulos →
committed e63ae3ee on 2.x
Issue #3394064 by idimopoulos, huzooka: Prevent unsupported characters...
-
idimopoulos →
committed e63ae3ee on 2.x
- Issue was unassigned.
- Status changed to Fixed
about 1 year ago 5:30pm 29 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.