- 🇺🇸United States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request → as a guide.
Not sure if this affects ckeditor
But tested this following the example in #13
$dbd = '#DBD';
$value = Xss::filterAdmin($dbd);Using breakpoint I see $value does still has datetime. Did I miss a step?
- Status changed to Needs review
almost 2 years ago 6:11am 4 February 2023 - 🇺🇸United States tedfordgif
Thanks for your work on this, @smustgrave. In your screenshot, the datetime attribute is the issue, not the #DBD text
1978-11-19T05:00:00Z is having the longest potential "protocol" left-trimmed, since Xss::filterAdmin treats any text followed by a colon as a protocol. That results in datetime="00Z", which is no longer a valid datetime attribute.
@neclimdul, thanks for cleaning up the patch.
- Status changed to Needs work
almost 2 years ago 2:27pm 4 February 2023 - 🇺🇸United States smustgrave
Thanks for the update.
Can confirm the issue and that the patch fixes the issue
Think we should extend the tests though. The issue summary mentions
<time datetime> <del datetime> <ins datetime>
but we only test for time.
Added a related ticket where we fixed something very similar.
- Status changed to Needs review
almost 2 years ago 8:57pm 4 February 2023 - 🇺🇸United States tedfordgif
Updated tests to include all elements with the datetime attribute. This doesn't give us any extra code coverage, but perhaps it helps prevent a regression in the future. There's an alternate patch if a single test scenario is preferred to three.
- 🇺🇸United States smustgrave
Nope you got it just right. Will mark it after the tests finish
- Status changed to RTBC
almost 2 years ago 10:57pm 4 February 2023 The last submitted patch, 23: 2692451-23.patch, failed testing. View results →
- Status changed to Needs work
almost 2 years ago 1:13am 19 March 2023 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Needs a reroll of the patch - no longer applies.
- Status changed to Needs review
almost 2 years ago 4:21am 20 March 2023 - 🇮🇳India Abhisheksingh27
Adding Reroll for 10.1.x. Below are the errors that occurred while applying the patch as the patch failed to apply.
error: patch failed: core/tests/Drupal/Tests/Component/Utility/XssTest.php:525
error: core/tests/Drupal/Tests/Component/Utility/XssTest.php: patch does not apply The last submitted patch, 28: 2692451-28.patch, failed testing. View results →
- 🇺🇸United States neclimdul Houston, TX
🐛 XSS::filter and filter_xss can create malformed attributes when you would expect them to be stripped Fixed was the conflicting patch.
Without the extra unrelated change in #28
The last submitted patch, 30: 2692451-30.patch, failed testing. View results →
- 🇺🇸United States tedfordgif
Spurious test failure disappeared after re-running the tests, back to NR.
- Status changed to RTBC
almost 2 years ago 11:17pm 22 March 2023 - 🇺🇸United States smustgrave
Test coverage looks good. There are a number of tickets around that Xss.php file.
- Status changed to Needs work
over 1 year ago 5:08am 3 April 2023 - 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
+++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php @@ -542,6 +542,22 @@ public function providerTestAttributes() { + '<del datetime="1789-08-22T12:30:00.1-04:00">deleted text</del>', + '<del datetime="1789-08-22T12:30:00.1-04:00">deleted text</del>', + 'Del with datetime attribute', + ['del'],
this case is being merged into the img case above it - bad merge?
- Status changed to Needs review
over 1 year ago 9:07pm 1 May 2023 - last update
over 1 year ago 29,370 pass - 🇺🇸United States neclimdul Houston, TX
I see, yes it does look like a bad merge.
- Status changed to RTBC
over 1 year ago 10:22pm 1 May 2023 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Committed and pushed 5af2ad5feb to 10.1.x and 966d2319e6 to 10.0.x and dbf142e91e to 9.5.x. Thanks!
-
alexpott →
committed 5af2ad5f on 10.1.x
Issue #2692451 by neclimdul, tedfordgif, smustgrave, mikey_p, larowlan:...
-
alexpott →
committed 5af2ad5f on 10.1.x
-
alexpott →
committed 966d2319 on 10.0.x
Issue #2692451 by neclimdul, tedfordgif, smustgrave, mikey_p, larowlan:...
-
alexpott →
committed 966d2319 on 10.0.x
- Status changed to Fixed
over 1 year ago 8:16am 2 May 2023 -
alexpott →
committed dbf142e9 on 9.5.x
Issue #2692451 by neclimdul, tedfordgif, smustgrave, mikey_p, larowlan:...
-
alexpott →
committed dbf142e9 on 9.5.x
Automatically closed - issue fixed for 2 weeks with no activity.