Active
Project:
ClamAV
Version:
2.0.2-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Dec 2022 at 13:00 UTC
Updated:
21 Feb 2023 at 09:18 UTC
Jump to comment: Most recent
D 9.5 php 8.1
Dragging an image into CKEditor 5 gives 3 log entries with verbose on:
1. file is scannable
2
Warning: fopen(private://inline-images/2022-12-06_12h13_20.png): Failed to open stream: "Drupal\Core\StreamWrapper\PrivateStream::stream_open" call failed in Drupal\clamav\Scanner\DaemonTCPIP->scan() (line 44 of / .../html/modules/contrib/clamav/src/Scanner/DaemonTCPIP.php)
#0 /.../html/core/includes/bootstrap.inc(347): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /.../html/modules/contrib/clamav/src/Scanner/DaemonTCPIP.php(44): fopen()
#3 /.../html/modules/contrib/clamav/src/Scanner.php(152): Drupal\clamav\Scanner\DaemonTCPIP->scan()
#4 /.../html/modules/contrib/clamav/clamav.module(41): Drupal\clamav\Scanner->scan()
#5 [internal function]: clamav_file_validate()
#6 /.../html/core/lib/Drupal/Core/Extension/ModuleHandler.php(426): call_user_func_array()
#7 /.../html/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}()
#8 /.../html/core/lib/Drupal/Core/Extension/ModuleHandler.php(433): Drupal\Core\Extension\ModuleHandler->invokeAllWith()
#9 /.../html/core/modules/file/file.module(259): Drupal\Core\Extension\ModuleHandler->invokeAll()
#10 /.../html/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php(247): file_validate()
#11 /.../html/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php(185): Drupal\ckeditor5\Controller\CKEditor5ImageController->validate()
#12 [internal function]: Drupal\ckeditor5\Controller\CKEditor5ImageController->upload()
#13 /.../html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#14 /.../html/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /.../html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#16 /.../html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#17 /.../html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /.../html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#19 /.../html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#20 /.../html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#21 /.../html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#22 /.../html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#23 /.../html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#24 /.../html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#25 /.../html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#26 /.../html/core/lib/Drupal/Core/DrupalKernel.php(707): Stack\StackedHttpKernel->handle()
#27 /.../html/index.php(19): Drupal\Core\DrupalKernel->handle()
#28 {main}
3
TypeError: stream_copy_to_stream(): Argument #1 ($from) must be of type resource, bool given in stream_copy_to_stream() (line 45 of /.../html/modules/contrib/clamav/src/Scanner/DaemonTCPIP.php)
#0 /.../html/modules/contrib/clamav/src/Scanner/DaemonTCPIP.php(45): stream_copy_to_stream()
#1 /.../html/modules/contrib/clamav/src/Scanner.php(152): Drupal\clamav\Scanner\DaemonTCPIP->scan()
#2 /.../html/modules/contrib/clamav/clamav.module(41): Drupal\clamav\Scanner->scan()
#3 [internal function]: clamav_file_validate()
#4 /.../html/core/lib/Drupal/Core/Extension/ModuleHandler.php(426): call_user_func_array()
#5 /.../html/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}()
#6 /.../html/core/lib/Drupal/Core/Extension/ModuleHandler.php(433): Drupal\Core\Extension\ModuleHandler->invokeAllWith()
#7 /.../html/core/modules/file/file.module(259): Drupal\Core\Extension\ModuleHandler->invokeAll()
#8 /.../html/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php(247): file_validate()
#9 /.../html/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php(185): Drupal\ckeditor5\Controller\CKEditor5ImageController->validate()
#10 [internal function]: Drupal\ckeditor5\Controller\CKEditor5ImageController->upload()
#11 /.../html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#12 /.../html/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#13 /.../html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#14 /.../html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#15 /.../html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#16 /.../html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#17 /.../html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#18 /.../html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#19 /.../html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#20 /.../html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#21 /.../html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#22 /.../html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#23 /.../html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#24 /.../html/core/lib/Drupal/Core/DrupalKernel.php(707): Stack\StackedHttpKernel->handle()
#25 /.../html/index.php(19): Drupal\Core\DrupalKernel->handle()
#26 {main}
Can anyone help ? Thank you.
Comments
Comment #2
maxilein commentedComment #3
maxilein commentedComment #4
maxilein commentedSymfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException: Object(Drupal\Core\Entity\Plugin\DataType\EntityAdapter): The anti-virus scanner could not check the file, so the file cannot be uploaded. Contact the site administrator if this problem persists. in Drupal\ckeditor5\Controller\CKEditor5ImageController->upload() (line 187 of /.../core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php
Mabe this is related: https://www.drupal.org/project/file_upload_secure_validator/issues/3328277
Comment #5
maxilein commentedComment #6
nicrodgers