Commit graph

479 commits

Author SHA1 Message Date
Hypolite Petovan 04d620fc2f
Merge pull request #8142 from nupplaphil/task/di_config
CleanUp Config namespace
2020-01-19 22:22:57 -05:00
Philipp Holzer ed9392469e
Remove unneeded Config namespace usages 2020-01-19 22:50:44 +01:00
Philipp Holzer d5a473abda
Shorten "PConfiguration" to "PConfig" again, since the Wrapper is gone 2020-01-19 22:23:44 +01:00
Michael dcbd44ab88 Removed the rest of the @brief fields 2020-01-19 20:44:01 +00:00
Philipp Holzer cb80108957
Shorten "Configuration" to "Config" again, since the Wrapper is gone 2020-01-19 21:29:36 +01:00
Philipp Holzer 21640ec5d8
Add missing Friendica\DI namespace to files (PHPStorm inspection) 2020-01-19 21:26:42 +01:00
Philipp Holzer 6c36fd9e01
Move Config::get() to DI::config()->get() 2020-01-19 21:21:13 +01:00
Philipp Holzer d6efc90194
cleanup namespace usages for L10n 2020-01-19 16:31:33 +01:00
Philipp Holzer d83f6335eb
Move L10n::getCurrentLang() calls to DI::l10n()->getCurrentLang() calls 2020-01-19 16:31:19 +01:00
Philipp Holzer cb4ad529f4
Move L10n::getDay() calls to DI::l10n()->getDay() calls 2020-01-19 16:31:18 +01:00
Philipp Holzer 5dfee31108
Move L10n::t() calls to DI::l10n()->t() calls 2020-01-19 16:31:16 +01:00
Philipp af88c2daa3
Merge pull request #8135 from annando/brief
@brief is removed completely
2020-01-19 12:31:02 +01:00
Michael 0a4119adaf @brief is removed completely 2020-01-19 06:05:23 +00:00
Hypolite Petovan 0b9aec4569
Add missing use Friendica\DI statement in Util\Emailer 2020-01-18 16:28:42 -05:00
Hypolite Petovan 58f69481e6
Merge pull request #8130 from nupplaphil/task/di_pconfig
Move PConfig to DI::pConfig()
2020-01-18 13:57:57 -05:00
Philipp Holzer 800694e9b3
Remove unused use statements & remove PConfig class 2020-01-18 17:02:59 +01:00
Philipp Holzer 9e9429b56d
Move PConfig::get() to DI::pConfig()->get() 2020-01-18 16:50:57 +01:00
Philipp Holzer 424c87195b
CleanUp Cache namespace
- Introduce enum "Duration"
- Introduce enum "Type"
- Move "Cache\Cache" to "BaseCache"
2020-01-18 15:41:19 +01:00
Michael 8215c493cf The archive functionality is working again 2020-01-15 04:06:30 +00:00
Philipp Holzer a38b0f7eaf
Move remaining namespaces and delete Core\Cache.php 2020-01-07 00:51:02 +01:00
Philipp Holzer fe078410a1
Move Cache::get() to DI::cache()->get() 2020-01-07 00:45:49 +01:00
Philipp Holzer f68929633b
Move Cache::set() to DI::cache()->set() 2020-01-07 00:41:20 +01:00
Philipp Holzer f0eea6f875
Remove get_app() in favor of DI::app() 2020-01-04 23:42:01 +01:00
Philipp Holzer 3f34229752
Move redundant System::baseUrl() to DI::baseUrl() calls 2019-12-30 23:00:08 +01:00
Philipp Holzer c1dbb25656
Creating interfaces for Config/PConfig & fix tests 2019-12-29 20:18:19 +01:00
Philipp Holzer 50be94aa5e
Remove deprecated App::getHostName() - process methods to DI::baseUrl()->getHostName() 2019-12-29 20:17:47 +01:00
Philipp Holzer 181529f3df
Refactor dynamic App::getProfiler() to static DI::profiler() 2019-12-29 20:17:42 +01:00
Philipp Holzer 388b963714
Replace BaseObject class with DI::* calls 2019-12-29 20:17:38 +01:00
Philipp Holzer 1de3f186d7
Introduce new DI container
- Adding Friendica\DI class for getting dynamic classes
- Replacing BaseObject::getApp() with this class
2019-12-29 20:16:55 +01:00
Hypolite Petovan 61c6daeff0 Add timezone information to logger timestamp 2019-12-24 16:07:36 -05:00
Michael Vogel a3b7f08f78 Don't guess the site info / restrict the description length 2019-11-15 14:28:42 +01:00
Hypolite Petovan 03bf1dcbd3 Move Object\Image static methods to Util\Images
- Optimize imports in modified files
2019-11-02 07:48:45 -04:00
Philipp Holzer f4ad82bcfb
make ACLFormatter::expand() nullable and return an empty array
- optimize tests
2019-11-01 15:43:16 +01:00
Philipp Holzer aa7be41728
Fix ACLFormatterTest
- Add nullable to expand() function again
- Add angle bracket support to toString()
2019-11-01 14:13:29 +01:00
Michael bef7eeed13 Fix 7778: Don't return empty string in permissions 2019-10-29 06:01:50 +00:00
Hypolite Petovan 9f460c6797
Merge pull request #7765 from nupplaphil/task/move_text
Move include/text.php to class structure
2019-10-23 15:57:01 -04:00
Philipp Holzer c9e1098dd2
Adapt naming convention 2019-10-23 21:39:00 +02:00
Philipp Holzer ad67fd3aa8
Move is_a_date_arg to DateTimeFormat::isYearMonth
- Improved functionality
- Added tests
2019-10-23 02:39:28 +02:00
Philipp Holzer 5843a80b6c
Move perms2str to ACLFormatter::aclToString()
- including new tests
2019-10-23 00:54:34 +02:00
Philipp Holzer f65f7f11c3
Move expand_acl to ACLFormatter::expand()
- including tests
2019-10-23 00:40:14 +02:00
Philipp Holzer 04a86dad75
remove superfluous line 2019-10-22 22:52:40 +02:00
Philipp Holzer 1fe9b789f3
Add some PHP doc 2019-10-22 22:51:52 +02:00
Philipp Holzer 6b2c28e2d7
Add checks & realpath() usage
- New util class "FileSystem"
- Add check in admin summary too
2019-10-22 22:47:37 +02:00
Philipp Holzer 0e84a843a4
Add Fallback in case the logfile isn't accessible.
- Fixes https://github.com/friendica/friendica/issues/7756#issuecomment-544227862
2019-10-21 21:53:55 +02:00
Michael 4664249fec Improved comment 2019-10-17 21:49:29 +00:00
Michael 36ba7fa79c Merge remote-tracking branch 'upstream/develop' into http-417 2019-10-17 21:37:24 +00:00
Hypolite Petovan 5dcf6bfc58 Remove extra spaces before closing parentheses in src/ 2019-10-16 08:58:09 -04:00
Hypolite Petovan 146646c4d4 Replace deprecated calls to defaults() by ?? and ?: in src/ 2019-10-16 08:38:52 -04:00
Michael 440da8a9f4 eol 2019-10-12 14:07:22 +00:00
Michael c1ab93a5d8 Strings.php: Spaces are transformed to Tabs. 2019-10-12 10:28:18 +00:00
Hypolite Petovan 2c2beb5c0a
Revert Util\Strings::escapeHtml changes from #7725
- Breaks display of inserted mentions
2019-10-11 22:19:20 -04:00
dew-git e1e1d26b5b Revert random_int changes. 2019-10-11 00:00:15 -08:00
dew-git b5dac16def Comply with coding style. 2019-10-10 20:50:51 -08:00
dew-git 811cdcdfcb Fix security vulnerbilities.
Fix possible length extension attack, predicable generators, timing attacks on hash comparision and improved formatting.
2019-10-10 15:21:41 -08:00
Michael 83b00ef308 New function "isAuthenticated" 2019-09-28 18:09:11 +00:00
Michael 6e9026e033 Renamed function, beginning to replace the "remote_user" function 2019-09-28 09:36:41 +00:00
Michael 3dd94355b7 Fix permissions when viewing photos, applying same fix to items as well 2019-09-27 05:49:23 +00:00
Michael 704cdf1b5a New function to store the "remote" session value / making the changes work 2019-09-26 04:47:42 +00:00
Michael 5254147ccc Fix "redir" loop 2019-09-23 22:13:20 +00:00
Hypolite Petovan f51b275b17 Add parameter type hints in Temporal::getDateofBirthField 2019-09-21 10:52:55 -04:00
Hypolite Petovan 118e737a49 Remove dependency to App object in Temporal::getDateofBirthField 2019-09-21 05:15:52 -04:00
Michael 5ea8116cfd Workaround for HTTP error 417 2019-09-02 20:39:51 +00:00
Philipp Holzer df7ec0cdf7
php notice fixings
addons:
- bufferapp (missing errorcode)
- twitter (wrong field name 'nickname')
core:
- bbcode (incomplete attachementdata)
- crypto (uninitialized key)
2019-08-27 08:27:07 +02:00
Philipp Holzer 08be92a862
Moved BaseURL to App namespace (because similar type as Arguments/Modules/Modes) 2019-08-15 17:23:00 +02:00
Michael b4c673a620 We now use a central function for fetching the postdata 2019-07-30 22:26:01 +00:00
Philipp Holzer 6c2cf494b5
Remove DependencyFactory
- Include all necessary classes in `dependencies.config.php`
- Add DI-reference to BaseObject (acts as a global registry)
- Refactor all static "init()" methods to use the global registry

- Refactor Logging for Worker-Logger a little bit
2019-07-27 23:54:12 +02:00
Hypolite Petovan 46f7b79c7d Switch server blocklist check to case-insensitive shell wildcard 2019-07-25 22:36:25 -04:00
Hypolite Petovan 3812d3d445 Enable two-factor app-specific passwords for ejabberd 2019-07-23 05:11:33 -04:00
Philipp Holzer 55999730e0
Introduce DICE
- Adding dice library
- Adding dependency config

- Removing Factories
- Refactoring App\Mode constructor
- Refactoring App\Router constructor
- Refactoring BasePath for DI usage
- Refactoring ConfigFileLoader constructor
- Refactoring Profiler constructor

- Adjust entrypoints (index, console, worker, ..)

- Adding functional test for DI
- Fix tests because of refactorings
2019-07-21 01:22:10 +02:00
Philipp Holzer 346290cc23
Reverted indention 2019-07-16 21:54:22 +02:00
Philipp Holzer 46a260aa01
Fix indentations 2019-07-16 20:19:56 +02:00
Philipp Holzer 92fb0a82ca
Dynamic config loading
- Move settings, defaults and dbstructure to directory 'static'
- Dynamic loading of config files (after the static loading)
- Filter out '-sample.config.php' and '-sample.ini.php' files
- Remove unnecessary ConfigFileManager
- Move ConfigFileLoader to Utils
- Add tests for multi-loading for INI, config and sample-filtering
2019-07-16 20:16:43 +02:00
Philipp Holzer c82127ffb7
Splitting ConfigCache & PConfigCache
- Remove IConfigCache & IPConfigCache
- Add new PConfigCache
- Add missing Logger::init() (bugfixing tests)
2019-07-12 22:53:37 +02:00
Philipp Holzer 7c54edd4b4
Fixing Network::post() caused by wrong argument 2019-06-10 19:34:16 +02:00
Michael 7bbacd3878 Fixes PR 7242: Now the "post" function works again 2019-06-10 16:58:00 +00:00
Philipp Holzer cc7444d84d
Move internal recursion-counter to the end of all cur/fetchUrl parameters 2019-06-10 14:34:54 +02:00
Philipp Holzer 10683a43c8
Add typed parameter for methods in Friendica\Util\Network 2019-06-10 12:06:41 +02:00
Dean Townsley 19e99f7e81 Use accessing function for session variable 2019-06-09 21:06:42 -05:00
Dean Townsley 5c93db4097 remove leftover logging 2019-06-09 21:06:42 -05:00
Dean Townsley af85e498ce expand permission check to remote array
This check was preventing multiple private images from different
users on the same server from loading on the same page.
It was only checking for permission for the single id returned by the
remote_user() function rather than the multiple possible autheniticated
id's stored in the remote arry session variable.
2019-06-09 21:06:42 -05:00
Philipp Holzer 4c5dd9f47c
Add more Strings::isHex() checks to photos 2019-05-30 10:30:15 +02:00
Philipp Holzer 3de540d1d1
Adding hexadecimal check for photos
see https://github.com/friendica/friendica/issues/6917#issuecomment-492798238
2019-05-29 20:28:25 +02:00
Hypolite Petovan 4e207ef786 Enable addon using emailer hooks to skip default call to mail() 2019-05-26 21:36:09 -04:00
Hypolite Petovan 956ae6241d Add exception message chain, string trace and original object to JsonLD normalize error logging 2019-05-20 15:28:54 -04:00
Hypolite Petovan 3395f56036 Add Unicode support to autolink regular expression
- Explicitly exclude non-breaking spaces from URLs as \s doesn't include them
2019-05-19 18:51:55 -04:00
Michael 6f3019ecdd Revert PR 7158 since it breaks umlauts 2019-05-19 09:34:49 +00:00
Hypolite Petovan 8fb9722cdc Replace htmlspecialchars_decode with html_entity_decode in XML::unescape
- Replace htmlspecialchars with htmlentities in XML::escape
- This allows for converting all entities from Diaspora messages to regular characters
2019-05-18 13:15:51 -04:00
Michael 87b98b8249 Sending direct messages via AP does work now - receiving is pending 2019-05-14 17:50:45 +00:00
Michael eef85584c2 AP: Parsing of messages from Pleroma should work now again 2019-04-26 06:17:37 +00:00
Michael af92f46a2d Workaround for systems who don't use a correct context in ActivityPub 2019-04-25 13:30:30 +00:00
Philipp Holzer 1480380af6
Basepath Hardening 2019-04-14 16:17:58 +02:00
Philipp Holzer 03e149270b
bugfix 2019-04-14 14:40:26 +02:00
Philipp Holzer 1dd1684885
Hardening save method in BaseURL 2019-04-10 20:38:39 +02:00
Philipp Holzer 40c075cf47
BaseURL hardening 2019-04-09 08:48:04 +02:00
Philipp Holzer edd4f06ad0
Adding tests 2019-04-09 08:31:18 +02:00
Philipp Holzer 318a3ca785
Create own base URL class which holds the whole base url business logic 2019-04-09 08:31:16 +02:00
Hypolite Petovan 6f94e51ba6 Add Strings::sanitizeFilePathItem method 2019-03-31 21:39:19 -04:00
Michael 55325f191b Merge remote-tracking branch 'upstream/develop' into ap-delivery-failure 2019-03-26 21:36:46 +00:00
Michael 198e150ba8 Archive inboxes after 5 days of delivery failures 2019-03-25 21:51:32 +00:00
Philipp Holzer d78598b64e
Fixing basepath issue 2019-03-25 09:39:33 +01:00