Leuchtfeuer / typo3-secure-downloads

Secure your assets and data from unwanted download. Apply TYPO3 access rights to ALL file assets (PDFs, TGZs or JPGs etc. - configurable) - protect them from direct access.
https://www.Leuchtfeuer.com
GNU General Public License v2.0
21 stars 34 forks source link

Exception after installation: pathShouldBeSecured() must be of the type string, null given #91

Closed farconada closed 1 year ago

farconada commented 4 years ago

Describe the bug after installing the extension with this config:

'secure_downloads' => [
            'additionalMimeTypes' => 'txt|text/plain,html|text/html',
            'cachetimeadd' => '3600',
            'debug' => '0',
            'documentRootPath' => '/',
            'domain' => 'http://mydomain.com/|http://my.other.domain.org/',
            'enableGroupCheck' => '1',
            'excludeGroups' => '-1,0',
            'forcedownload' => '0',
            'forcedownloadtype' => 'odt|pptx?|docx?|xlsx?|zip|rar|tgz|tar|gz',
            'groupCheckDirs' => '',
            'linkPrefix' => 'securedl',
            'log' => '0',
            'outputChunkSize' => '1048576',
            'outputFunction' => 'stream',
            'protectedPath' => '',
            'securedDirs' => 'fileadmin_secure',
            'securedFiletypes' => '*',
            'strictGroupCheck' => '0',
            'tokenPrefix' => 'sdl-',
        ],

I have an exception when I go to "file list" in BE.

Argument 1 passed to Bitmotion\SecureDownloads\Service\SecureDownloadService::pathShouldBeSecured() must be of the type string, null given, called in /var/www/site/public/typo3conf/ext/secure_downloads/Classes/EventListener/SecureDownloadsEventListener.php on line 65

fileadmin_secure is an storage folder with an absolute path (/var/www/site/fileadmin_secure) outside of the public folder (/var/www/site/public)

versions:

bk2k/bootstrap-package             11.0.2   Bootstrap Package delivers a full configured frontend theme for TYPO3, based on the Bootstrap CSS Framework.
cogpowered/finediff                0.3.1    PHP implementation of a Fine granularity Diff engine
doctrine/annotations               1.10.3   Docblock Annotations Parser
doctrine/cache                     1.10.2   PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mong...
doctrine/dbal                      2.10.2   Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/event-manager             1.1.1    The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/instantiator              1.3.1    A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                     1.2.1    PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
egulias/email-validator            2.19.0   A library for validating emails against several RFCs
firebase/php-jwt                   v5.2.0   A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.
fluidtypo3/flux                    9.4.1    The flux package from FluidTYPO3
fluidtypo3/vhs                     6.0.3    The vhs package from FluidTYPO3
georgringer/news                   8.3.0    Versatile news extension, based on extbase & fluid for TYPO3 CMS
guzzlehttp/guzzle                  6.5.5    Guzzle is a PHP HTTP client library
guzzlehttp/promises                v1.3.1   Guzzle promises library
guzzlehttp/psr7                    1.6.1    PSR-7 message implementation that also provides common utility methods
helhum/config-loader               v0.12.2  Generic config loader with context and environment support.
helhum/typo3-console               v6.3.2   A reliable and powerful command line interface for TYPO3 CMS
leuchtfeuer/secure-downloads       v4.1.1   "Secure Download": Apply TYPO3 access rights to ALL file assets (PDFs, TGZs or JPGs etc. - configurable) - protect them from direct ...
nikic/php-parser                   v4.7.0   A PHP parser written in PHP
paragonie/random_compat            v9.99.99 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phpdocumentor/reflection-common    2.2.0    Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock  5.2.0    With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded ...
phpdocumentor/type-resolver        1.3.0    A PSR-5 based resolver of Class names, Types and Structural Element Names
psr/cache                          1.0.1    Common interface for caching libraries
psr/container                      1.0.0    Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher               1.0.0    Standard interfaces for event handling.
psr/http-client                    1.0.1    Common interface for HTTP clients
psr/http-factory                   1.0.1    Common interfaces for PSR-7 HTTP message factories
psr/http-message                   1.0.1    Common interface for HTTP messages
psr/http-server-handler            1.0.1    Common interface for HTTP server-side request handler
psr/http-server-middleware         1.0.1    Common interface for HTTP server-side middleware
psr/log                            1.1.3    Common interface for logging libraries
ralouphie/getallheaders            3.0.3    A polyfill for getallheaders.
scssphp/scssphp                    1.1.1    scssphp is a compiler for SCSS written in PHP.
symfony/cache                      v4.4.11  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/cache-contracts            v1.1.9   Generic abstractions related to caching
symfony/config                     v4.4.11  Symfony Config Component
symfony/console                    v4.4.11  Symfony Console Component
symfony/dependency-injection       v4.4.11  Symfony DependencyInjection Component
symfony/event-dispatcher           v4.4.11  Symfony EventDispatcher Component
symfony/event-dispatcher-contracts v1.1.9   Generic abstractions related to dispatching event
symfony/expression-language        v4.4.11  Symfony ExpressionLanguage Component
symfony/filesystem                 v4.4.11  Symfony Filesystem Component
symfony/finder                     v4.4.11  Symfony Finder Component
symfony/http-foundation            v4.4.11  Symfony HttpFoundation Component
symfony/inflector                  v4.4.11  Symfony Inflector Component
symfony/intl                       v4.4.11  A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/mailer                     v4.4.11  Symfony Mailer Component
symfony/mime                       v4.4.11  A library to manipulate MIME messages
symfony/polyfill-ctype             v1.18.1  Symfony polyfill for ctype functions
symfony/polyfill-intl-icu          v1.18.1  Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn          v1.18.1  Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer   v1.18.1  Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring          v1.18.1  Symfony polyfill for the Mbstring extension
symfony/polyfill-php70             v1.18.1  Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-php72             v1.18.1  Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73             v1.18.1  Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80             v1.18.1  Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/process                    v4.4.11  Symfony Process Component
symfony/property-access            v4.4.11  Symfony PropertyAccess Component
symfony/property-info              v4.4.11  Symfony Property Info Component
symfony/routing                    v4.4.11  Symfony Routing Component
symfony/service-contracts          v1.1.9   Generic abstractions related to writing services
symfony/var-dumper                 v4.4.11  Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter               v4.4.11  A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/yaml                       v4.4.11  Symfony Yaml Component
typo3/class-alias-loader           v1.1.3   Amends the composer class loader to support class aliases to provide backwards compatibility for packages
typo3/cms-about                    v10.4.6  Shows info about TYPO3, installed extensions and a separate module for available modules.
typo3/cms-adminpanel               v10.4.6  The TYPO3 admin panel provides a panel with additional functionality in the frontend (Debugging, Caching, Preview...)
typo3/cms-backend                  v10.4.6  Classes for the TYPO3 backend.
typo3/cms-belog                    v10.4.6  Displays backend log, both per page and system wide. Available as the module Tools>Log (system wide overview) and Web>Info/Log (page...
typo3/cms-beuser                   v10.4.6  Backend user administration and overview. Allows you to compare the settings of users and verify their permissions and see who is on...
typo3/cms-cli                      2.0.0    TYPO3 command line binary
typo3/cms-composer-installers      v3.0.1   TYPO3 CMS Installers
typo3/cms-core                     v10.4.6  The core library of TYPO3.
typo3/cms-extbase                  v10.4.6  A framework to build extensions for TYPO3 CMS.
typo3/cms-extensionmanager         v10.4.6  TYPO3 Extension Manager
typo3/cms-felogin                  v10.4.6  A template-based plugin to log in Website Users in the Frontend
typo3/cms-filelist                 v10.4.6  Listing of files in the directory
typo3/cms-fluid                    v10.4.6  Fluid is a next-generation templating engine which makes the life of extension authors a lot easier!
typo3/cms-fluid-styled-content     v10.4.6  A set of common content elements based on Fluid for Frontend output.
typo3/cms-form                     v10.4.6  Form Library, Plugin and Editor
typo3/cms-frontend                 v10.4.6  Classes for the frontend of TYPO3.
typo3/cms-impexp                   v10.4.6  Import and Export of records from TYPO3 in a custom serialized format (.T3D) for data exchange with other TYPO3 systems.
typo3/cms-info                     v10.4.6  Shows various infos
typo3/cms-install                  v10.4.6  The Install Tool mounted as the module Tools>Install in TYPO3.
typo3/cms-lowlevel                 v10.4.6  Enables the 'Config' and 'DB Check' modules for technical analysis of the system. This includes raw database search, checking relati...
typo3/cms-recordlist               v10.4.6  List of database-records
typo3/cms-redirects                v10.4.6  Custom redirects in TYPO3.
typo3/cms-reports                  v10.4.6  The reports module groups several system reports.
typo3/cms-rte-ckeditor             v10.4.6  Integration of CKEditor as Rich Text Editor.
typo3/cms-seo                      v10.4.6  SEO features for TYPO3.
typo3/cms-setup                    v10.4.6  Allows users to edit a limited set of options for their user profile, eg. preferred language and their name and email address.
typo3/cms-sys-note                 v10.4.6  Records with messages which can be placed on any page and contain instructions or other information related to a page or section.
typo3/cms-t3editor                 v10.4.6  JavaScript-driven editor with syntax highlighting and codecompletion. Based on CodeMirror.
typo3/cms-tstemplate               v10.4.6  Framework for management of TypoScript template records for the CMS frontend.
typo3/cms-viewpage                 v10.4.6  Shows the frontend webpage inside the backend frameset.
typo3/minimal                      v10.4.0  Minimal required set of TYPO3 extensions
typo3/phar-stream-wrapper          v3.1.5   Interceptors for PHP's native phar:// stream handling
typo3fluid/fluid                   2.6.9    The TYPO3 Fluid template rendering engine
webmozart/assert                   1.9.1    Assertions to validate method input/output with nice error messages.
localhorst commented 3 years ago

@flossels Is this resolved? Can I use @ayacoo's forked repo in the meantime?

timdreier commented 3 years ago

Getting the same error. Is there any update on this?