Commit Graph

230 Commits

Author SHA1 Message Date
bdalsass
81791dd253 N°8313 - edit dashboard 2025-05-16 14:05:55 +02:00
odain
f8b54be896 N°7426 - no session created - replace php_sapi_name() by PHP_SAPI 2024-05-16 14:10:54 +02:00
Pierre Goiffon
5a43448644 N°6458 Security hardening 2023-11-15 11:14:07 +01:00
Pierre Goiffon
c72cb7e70e N°6606 security hardening 2023-10-13 17:15:37 +02:00
Pierre Goiffon
9df92665e0 N°6606 Backport of utils::ENUM_SANITIZATION_FILTER_* constants
Were introduced in 3.0.0, but not added to the support/2.7 branch
2023-10-13 17:10:35 +02:00
Molkobain
851ab9c356 N°6097 - Add \utils::GetDataPath() method to avoid duplicating manual path build 2023-08-10 15:45:39 +02:00
Eric Espie
5475b9fbbe N°3454 - MoveToProd in 2 steps - fix utils::GetCurrentModuleName() 2023-07-25 17:44:43 +02:00
Eric Espie
6f8e7c7002 N°3454 - MoveToProd in 2 steps - fix utils::GetCurrentModuleUrl() 2023-07-25 17:20:37 +02:00
Stephen Abello
2b5973ec67 N°6436 - Integrate Performance Audit pre requisite in iTop Pro 2.7.9 2023-07-18 09:15:37 +02:00
Eric Espie
9e96ea2873 N°6350 - code hardening 2023-06-01 15:35:56 +02:00
Pierre Goiffon
d412a52fcc N°4449 Fix FPD in dashboard export/import 2022-11-29 18:10:17 +01:00
Molkobain
80e7313b24 PHPDoc 2022-05-19 17:40:14 +02:00
Benjamin Dalsass
5f0a820b4a N°4899 - add sanitizer url since annotation and tests for sanitizer function 2022-05-19 08:36:42 +02:00
Benjamin Dalsass
03ef4246bf N°4899 - add sanitizer url since annotation and tests for sanitizer function 2022-05-18 12:03:07 +02:00
Benjamin Dalsass
8e97279401 N°4899 - Reflected XSS on revert_dashboard operation 2022-05-17 09:27:06 +02:00
Pierre Goiffon
809ea2eb49 💡 N°4854 Add phpdoc to utils::*Module* methods 2022-03-02 09:42:09 +01:00
Molkobain
4a67819f87 N°4714 - Revert rename of utils::GetItopVersionWikiSyntax as it is used in cached packages in the ITSM Designer 2022-02-11 20:00:39 +01:00
Pierre Goiffon
299ad7e753 N°4714 Fix \utils::GetCoreVersionWikiSyntax throwing Exception when 2nd version digit is "0" (for example in 3.0.1) 2022-02-08 14:48:02 +01:00
Pierre Goiffon
b4fc647845 N°4714 Rename \utils::GetItopVersionWikiSyntax to GetCoreVersionWikiSyntax
Will avoid confusion between core or product version !
2022-02-01 15:40:43 +01:00
Pierre Goiffon
17612f88d3 N°4714 utils version method refactoring
- removes utils::GetItopPatchVersion and GetItopMinorVersion : unused and badly named :/
- GetItopVersionWikiSyntax now uses core version constant
- iTopModulesPhpVersionIntegrationTest::testiTopModulesPhpVersion now uses ITOP_CORE_VERSION constant
2022-02-01 15:24:56 +01:00
Pierre Goiffon
fcfcf85e0d N°4714 fix constant version usages in utils methods 2022-02-01 11:39:57 +01:00
Pierre Goiffon
b5074c4cee N°3806 Fix saying memory_limit isn't enough in CLI scripts and setup
This was caused by the strict comparison in \utils::IsMemoryLimitOk for the special "-1" value of memory_limit, which was added in c2f5cafa.
Fix was to change \utils::ConvertToBytes : it was returning original value when input was numeric (so if input is '-1' output was '-1')  now it always returns an int (input '-1' output -1)
2021-06-28 14:53:39 +02:00
Pierre Goiffon
2625d2da80 💡 PHPDoc 2021-06-03 15:29:13 +02:00
Pierre Goiffon
44952d1ea0 Fix \UtilsTest::testIsMemoryLimit 2021-05-25 17:04:32 +02:00
BGdu38
c2f5cafaf3 Avoid setting memory_limit to lower value than the one already configured (#215)
Some scripts are setting the memory_limit PHP option : setup, csvimport and XLSX export. This was done to avoid crashing when dealing with such large amount of data.
But sometimes we were setting the value without any prior check, so we could actually lower the memory_limit value :/

Now this memory_limit change is done using \utils::SetMinMemoryLimit, which will call ini_set if and only if the current value is lower than the one to be set.

Setup calls (setup/ajax.dataloader.php and webservices/backoffice.dataloader.php) were left as is as they weren't subject to this bug, and also they are more complex (logging done on each case).
2021-05-25 12:03:19 +02:00
Pierre Goiffon
2432ff77a3 💡 More details in PHPDoc for \utils::RealPath 2021-03-17 08:34:25 +01:00
odain
386c90c601 N°3668 - URL direct error: renamed trust_proxies<-behind_reverse_proxy 2021-03-15 14:56:16 +01:00
odain
3bcae734e5 N°3671 : persist absolute URL when setup context (force trustproxy enabled) 2021-03-15 12:27:05 +01:00
bruno-ds
ae6a264d6d N°3671 - fix typo in HTTP header name 2021-03-05 16:57:03 +01:00
bruno-ds
a06bf6ea7c coding convention (thanks @molkobain) 2021-03-05 09:20:04 +01:00
bruno-ds
bb8d4a92cb fix an indentation problem (thanks @Hipska) 2021-03-04 09:56:05 +01:00
bruno-ds
1f26b59d90 N°3671 - add an API endpoint (it will be used by N°3668 and N°3760) + some code cleanup asked by @molkobain 2021-03-04 09:32:13 +01:00
bruno-ds
7b093a6bba N°3671 - app_root_url: handle reverse proxies during the setup and preserve existing configuration during an upgrade. 2021-03-03 11:55:18 +01:00
odain
82ba7f25b0 N°3412 - Command Injection vulnerability in the Setup Wizard - do not use escapeshellcmd before execution in Windows envt 2021-02-17 10:18:28 +01:00
odain
bb877a244b N°3412 - Command Injection vulnerability in the Setup Wizard - do not use escapeshellcmd before execution in Windows envt 2021-02-17 10:09:39 +01:00
odain
4e0eed6e13 N°3270 Notify on expiration not sending notification (trigger exception)
add boilerplate function and use it to intercept/enrich trigger exception loops
2020-09-25 07:18:14 +02:00
Eric
f74c78d61c N°3248 - code hardening 2020-08-18 17:02:46 +02:00
odain
8902d6e532 CI migration/automation + new test to ease iTop release management
- new Jenkinsfile and .jenkins removal to launch phpunit/behat tests
triggered on both iTop build and push.
 - N°3053 - Check XML conversion methods
 - N°3057 - New build recipe
 - N°3059 - Automatically set the documentation URLs
 - N°3052 - Check community modules XML version against latest version
 - N°3054 - Check community modules version against major version
 - N°3062 - setup.css file integrity test
 - N°3060 - Check consistency between the list of modules and installation.xml
 - Add exclusion group for CI
 - N°3061 - Automatically check the installation.xml consistency
2020-08-07 14:48:51 +02:00
Pierre Goiffon
0d1059a8fc Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts:
#	application/utils.inc.php
#	conf/web.config
#	datamodels/2.x/itop-backup/ajax.backup.php
#	datamodels/2.x/itop-backup/status.php
2020-05-18 09:24:46 +02:00
Pierre Goiffon
834297e675 N°2985 Security hardening (#140)
Thanks @bruno-ds  for the review !
2020-05-13 10:04:40 +02:00
Pierre Goiffon
f8e39877b3 N°2988 Security hardening 2020-05-07 11:49:58 +02:00
Eric
06b17e82db N°2755 - Security hardening 2020-04-09 11:03:07 +02:00
Eric
2add79a473 N°2853 - Security hardening 2020-04-09 10:55:17 +02:00
acognet
60f5c60059 N°1796 - Search : false criteria after using the magnifier 2020-03-30 16:19:23 +02:00
Molkobain
5a01a76f80 N°2735 - Add new sanitize filter ('element_identifier') for dashboard identifier 2020-02-26 12:10:18 +01:00
Stephen Abello
12ce718662 Internal: Add HtmlEntityDecode() to utils, a counterpart to HtmlEntities() 2020-02-12 14:53:19 +01:00
Molkobain
3ae2058f6f N°2314 - Markup extensibility: Refactor utils::GetCSSFromSASS() to enable SCSS compilation out of a file 2020-01-24 17:02:02 +01:00
Pierre Goiffon
13d31ac211 utils::GetDefaultUrlAppRoot : make comparison case insentitive, add a test 2019-12-23 11:06:29 +01:00
Pierre Goiffon
47d8e35639 N°330 Improve \ormDocument::GetFormattedSize
* Fix typo in method name (many thanks @jbostoen !)
* Use \utils::BytesToFriendlyFormat
2019-12-17 15:08:22 +01:00
Pierre Goiffon
46d6779562 🎨 utils : some code formatting + 1 @var 2019-12-10 17:57:55 +01:00