dolibarr/htdocs/core/lib
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
..
accounting.lib.php Fix #28071 - New branch to fix bad merge (#28083) 2024-02-09 15:58:49 +01:00
admin.lib.php Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154) 2024-02-13 21:46:12 +01:00
agenda.lib.php fix warnings in select_resource_list (#28189) 2024-02-16 02:40:27 +01:00
ajax.lib.php NEW determine multi-currency price on object line create tpl (#28021) 2024-02-10 01:09:24 +01:00
asset.lib.php NEW Asset Module - make asset model creation in a single step (#26982) 2024-02-01 16:26:25 +01:00
bank.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
barcode.lib.php Fix some php warnings and errors (#28138) 2024-02-13 11:26:40 +01:00
categories.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
company.lib.php QUAL: Properties ->date_update and ->date_modification were merged into 2024-02-15 14:08:08 +01:00
contact.lib.php QUAL: Properties ->date_update and ->date_modification were merged into 2024-02-15 14:08:08 +01:00
contract.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
cron.lib.php Clean code with rector 2 2024-01-05 04:33:58 +01:00
date.lib.php Work on generic filter 2024-02-17 04:07:34 +01:00
doc.lib.php Fix php8.2 warnings 2023-11-27 11:39:32 +01:00
doleditor.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
donation.lib.php
ecm.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
emailing.lib.php Fix php8.2 warnings 2023-11-27 11:39:32 +01:00
eventorganization.lib.php
expedition.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
expensereport.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
fichinter.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
files.lib.php Add phpunit to test the rename/move into a corrupted pdf file. 2024-02-17 18:59:57 +01:00
fiscalyear.lib.php
format_cards.lib.php
fourn.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
ftp.lib.php Fix utf8_encoding/decoding (PHP8.2 deprecation) 2023-12-27 19:45:37 +01:00
functions_ch.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
functions.lib.php FIX Bad CRLF when sending text only content. Fix dol_htmlwithnojs() 2024-02-18 02:11:15 +01:00
functions2.lib.php FIX: Fix unneeded access outside open_basedir when looking for modules (#28237) 2024-02-18 15:09:01 +01:00
functionsnumtoword.lib.php NEW Top menu support picto of modules that are font awesome picto. 2023-10-13 15:00:51 +02:00
geturl.lib.php Avoid error 2024-02-15 15:22:33 +01:00
holiday.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
hrm.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
images.lib.php qual: phpstan (#28075) 2024-02-09 11:28:33 +01:00
import.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
intracommreport.lib.php
invoice.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
invoice2.lib.php Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154) 2024-02-13 21:46:12 +01:00
json.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
ldap.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
loan.lib.php Fix php8.2 warnings 2023-11-27 11:39:32 +01:00
mailmanspip.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
member.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
memory.lib.php fix: phpstan 2024-01-18 21:07:44 +01:00
modelemail.lib.php fix orthographe 2024-01-30 15:51:38 +01:00
modulebuilder.lib.php fix param 2024-01-20 09:22:38 +01:00
multicurrency.lib.php
oauth.lib.php Debug v19 2024-01-19 11:28:02 +01:00
order.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
parsemd.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
payments.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
pdf.lib.php Fix #28071 - New branch to fix bad merge (#28083) 2024-02-09 15:58:49 +01:00
phpsessionindb.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
prelevement.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
price.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
product.lib.php qual: phpstan (#28075) 2024-02-09 11:28:33 +01:00
profid.lib.php Merge branch 'Dolibarr:develop' into patch-7 2024-01-28 13:35:30 +01:00
project.lib.php Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154) 2024-02-13 21:46:12 +01:00
propal.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
receiptprinter.lib.php
reception.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
report.lib.php Fix #28071 - New branch to fix bad merge (#28083) 2024-02-09 15:58:49 +01:00
resource.lib.php Fix with php-cs-fixer 2023-12-04 12:05:28 +01:00
salaries.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
security.lib.php Work on custom reports 2024-02-16 23:56:07 +01:00
security2.lib.php Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154) 2024-02-13 21:46:12 +01:00
sendings.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
signature.lib.php Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-01-23 22:15:36 +01:00
stock.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
supplier_proposal.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
takepos.lib.php
tax.lib.php fix param 2024-01-20 09:22:38 +01:00
ticket.lib.php fix phpstan (#27482) 2024-01-13 15:32:37 +01:00
treeview.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
trip.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
usergroups.lib.php update function show_actions_done for list users events (#28095) 2024-02-09 19:01:45 +01:00
vat.lib.php
website.lib.php FIX Pb in redirect of a website page in USEDOLIBARRSERVER mode 2024-02-17 15:10:42 +01:00
website2.lib.php Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154) 2024-02-13 21:46:12 +01:00
ws.lib.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
xcal.lib.php Clean code with rector 2 2024-01-05 04:33:58 +01:00