dolibarr/htdocs/core
MDW f5dd7d7c93
FIX: Fix unneeded access outside open_basedir when looking for modules (#28237)
* FIX: Fix unneeded access outside open_basedir when looking for modules

# FIX: Fix unneeded access outside open_basedir when looking for modules

Change the order in which the if conditions are tested so that an is_dir("dir/..") is avoided
by first testing if the subpath starts with a dot.

Also changed uppercased the first 3 letters of the file before comparing to CVS.

Finally, improved the typing hint and documentation.

The PHPUNIT test failed like this:

```
35) ExportTest::testExportModulesDatasets
is_dir(): open_basedir restriction in effect. File(D:\a\dolibarr\dolibarr\htdocs/..) is not within the allowed path(s): (D:\a\dolibarr\dolibarr\htdocs;D:\a\dolibarr\dolibarr\documents;D:\a\dolibarr\dolibarr\test;D:\a\dolibarr\dolibarr\dev\initdemo;c:\tools\php)

D:\a\dolibarr\dolibarr\htdocs\core\lib\functions2.lib.php:100
D:\a\dolibarr\dolibarr\htdocs\exports\class\export.class.php:119
D:\a\dolibarr\dolibarr\test\phpunit\ExportTest.php:463
```

* Fix spelling
2024-02-18 15:09:01 +01:00
..
ajax FIX ajaxtooltip must return content with no html header/footer even for 2024-02-14 03:38:17 +01:00
boxes fix warnings (#28103) 2024-02-10 17:25:43 +01:00
class qual: phpstan for htdocs/compta/bank/class/account.class.php (#28242) 2024-02-18 15:04:44 +01:00
data
db fix phpstan pgsql.class.php (#28152) 2024-02-13 09:03:30 +01:00
filemanagerdol qual: phpstan for htdocs/core/filemanagerdol/connectors/php/connector.lib.php 2024-01-31 21:25:45 +01:00
js FIX ajaxtooltip must return content with no html header/footer even for 2024-02-14 03:38:17 +01:00
lib FIX: Fix unneeded access outside open_basedir when looking for modules (#28237) 2024-02-18 15:09:01 +01:00
login Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154) 2024-02-13 21:46:12 +01:00
menus Fix #28071 - New branch to fix bad merge (#28083) 2024-02-09 15:58:49 +01:00
modules qual: phpstan for htdocs/core/modules/barcode/modules_barcode.class.php (#28244) 2024-02-18 15:02:20 +01:00
tpl fix warnings in select_resource_list (#28189) 2024-02-16 02:40:27 +01:00
triggers Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154) 2024-02-13 21:46:12 +01:00
actions_addupdatedelete.inc.php Fix #28071 - New branch to fix bad merge (#28083) 2024-02-09 15:58:49 +01:00
actions_builddoc.inc.php fix param 2024-01-20 09:22:38 +01:00
actions_changeselectedfields.inc.php
actions_comments.inc.php qual: phpstan for htdocs/core/actions_comments.inc.php 2024-01-24 21:51:48 +01:00
actions_dellink.inc.php Fix with php-cs-fixer 2023-12-04 12:07:53 +01:00
actions_extrafields.inc.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
actions_fetchobject.inc.php Fix with php-cs-fixer 2023-12-04 12:07:53 +01:00
actions_lineupdown.inc.php Fix php8.2 warnings 2023-11-27 11:39:32 +01:00
actions_linkedfiles.inc.php Fix with php-cs-fixer 2023-12-04 12:07:53 +01:00
actions_massactions.inc.php Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154) 2024-02-13 21:46:12 +01:00
actions_printing.inc.php
actions_sendmails.inc.php Add log 2024-02-18 02:12:34 +01:00
actions_setmoduleoptions.inc.php fix phpcs warning (#28074) 2024-02-09 11:30:27 +01:00
actions_setnotes.inc.php fix warning (#28102) 2024-02-10 17:25:30 +01:00
antispamimage.php fix param 2024-01-20 09:22:38 +01:00
bookmarks_page.php Fix php8.2 warnings 2023-11-27 11:39:32 +01:00
commonfieldsinexport.inc.php fix param 2024-01-20 09:22:38 +01:00
commonfieldsinimport.inc.php fix param 2024-01-20 09:22:38 +01:00
customreports.php Test 2024-02-18 14:27:15 +01:00
datepicker.php fix param 2024-01-20 09:22:38 +01:00
doxygen.php
extrafieldsinexport.inc.php fix param 2024-01-20 09:22:38 +01:00
extrafieldsinimport.inc.php fix param 2024-01-20 09:22:38 +01:00
get_info.php Remove dead code 2024-01-25 17:36:02 +01:00
get_menudiv.php Debug css v19 2023-12-14 00:29:57 +01:00
multicompany_page.php
photos_resize.php fix param 2024-01-20 09:22:38 +01:00
search_page.php
search.php
tools.php
website.inc.php Fix php8.2 warnings 2023-11-27 11:39:32 +01:00