Commit Graph

937 Commits (develop)

Author SHA1 Message Date
Michael 8a902afde5 Updated messages.po - again 2023-01-12 07:06:24 +00:00
Hypolite Petovan 3fcafd1d50 Replace HTML regular expression by HTML::extractCharset in ParseUrl::getSiteInfo
- Address https://github.com/friendica/friendica/issues/12488#issuecomment-1374537440
2023-01-10 10:36:59 -05:00
Hypolite Petovan 6bee344681 Add yet another case to DateTimeFormat::fix
- Address https://github.com/friendica/friendica/issues/12488#issuecomment-1372637862
2023-01-09 11:38:25 -05:00
Hypolite Petovan a907d6c87b Add UriInterface-enabled isUriBlocked method in Util\Network 2023-01-04 14:41:08 -05:00
Hypolite Petovan 8bbf9e93c6 Remove dependency to the second parameter of XML::fromArray 2023-01-01 19:20:42 -05:00
Michael f1bcf1ef66 Set the server status directly after transmission 2023-01-01 17:34:05 +00:00
Michael 360614d2cf Merge remote-tracking branch 'upstream/develop' into inbox-gsid 2023-01-01 15:25:28 +00:00
Hypolite Petovan 1874a32728 Happy New Year 2023! 2023-01-01 09:36:24 -05:00
Michael 06403f1546 License updated 2023-01-01 07:52:28 +00:00
Michael e21db0fe6d The inbox-status can now be archived for a whole server 2022-12-31 23:42:00 +00:00
Hypolite Petovan b6f3f298fe Add new case to DateTimeFormat::fix
- Address https://github.com/friendica/friendica/issues/12488#issuecomment-1368011436
2022-12-30 21:40:37 -05:00
Hypolite Petovan 19b5362f93 Return early when inbox-status row couldn't be inserted in HTTPSignature->setInboxStatus
- Address https://github.com/friendica/friendica/issues/12488?notification_referrer_id=NT_kwDOAA4e57E1MTM1MzE3MjU2OjkyNTQxNQ#issuecomment-1366991471
2022-12-30 17:23:23 -05:00
Hypolite Petovan 6e31b8d6a5 Avoid return type exeption in HTTPSignature->post
- Prefer passing the owner record array instead of just the uid
- +4/-7 calls to User::getOwnerDataById
2022-12-30 17:23:22 -05:00
Hypolite Petovan a1dc6e2417 Switch rounding to flooring in Temporal::getRelativeDate
- Add tests for regression
2022-12-28 00:32:26 -05:00
Hypolite Petovan 53c0fffbec Add ClockInterface dependency to Temporal::getRelativeDate
- Remove unused $format parameter
2022-12-28 00:31:20 -05:00
Michael 46fdf696ee Issue 12524: Fix first day of week 2022-12-25 22:45:34 +00:00
Michael e733adcaae Issue 12419: Quickhack to make GoToSocial work 2022-12-19 21:21:06 +00:00
Hypolite Petovan f2188835e7 Add logging and default value when JSON encode->decode fails in JsonLD::compact
- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1357768936
2022-12-19 10:22:05 -05:00
Hypolite Petovan 39607b20e2 Convert custom profile field URL values to rel="me" links 2022-12-18 23:24:59 -05:00
Hypolite Petovan 0d95535137
Merge pull request #12389 from annando/fatal
Handle some fatal errors
2022-12-11 15:04:54 -05:00
Michael 5d3248d57b Handle some fatal errors 2022-12-11 16:48:36 +00:00
Hypolite Petovan a79be5e697 Add Clock classes to deal with "now" times in tests
- [Composer] Add psr/clock dependency
2022-12-11 10:12:23 -05:00
Michael fc1ef084f4 Simplify variable name 2022-12-11 04:16:58 +00:00
Michael a65aa75234 Issue 12367: Calculate relative date on "date" level instead of "datetime" 2022-12-11 03:24:36 +00:00
Michael a5be5b27e3 Support Blurhash 2022-12-04 13:29:21 +00:00
Hypolite Petovan e6f8b8c6e0 Ward against preg_replace_callback null return value in Strings::performWithEscapedBlocks
- Add logging to troubleshoot potential issue with regex
- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1335124938
2022-12-03 04:20:27 -05:00
Marek Bachmann a3d8a59b00 Correctly output binary prefix values since base 2 is used for conversion 2022-11-30 04:37:08 +01:00
Marek Bachmann 75b01f669a Check for inf values before try to converts bytes to binary prefix strings 2022-11-30 04:35:18 +01:00
Marek Bachmann a01872a117 Merge branch 'develop' into show_image_upload_limit
# Conflicts:
#	src/Util/Strings.php
#	view/lang/C/messages.po
2022-11-27 23:52:58 +01:00
MarekBenjamin 765b50bde8
Update src/Util/Strings.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2022-11-26 23:14:21 +01:00
MarekBenjamin ce56cabd9f
Update src/Util/Strings.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2022-11-26 23:12:46 +01:00
Marek Bachmann 6c73077bbc whitespaces 2022-11-26 21:53:12 +01:00
Marek Bachmann 907deed523 introduced getBytesFromShorthand function to covert from shorthand notation to int 2022-11-26 21:43:31 +01:00
Hypolite Petovan 55640eec87 [Composer] Upgrade to phpseclib version 3
- Create custom Key file format for Salmon Magic key
- Remove obsolete pemToME and MEtoPem Crypto methods
- Remove unused newECKeypair Crypto method
- Switch to constant-time Base64 encode/decode in Base64Url Strings methods
2022-11-25 08:13:05 -05:00
Hypolite Petovan a3fb499735 Replace call to parse_url() with Uri instanciation in Util\Proxy
- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1321796513
2022-11-25 08:13:05 -05:00
Hypolite Petovan 4dc96daeb3 mail() requires additional headers to be separated by CRLF
- Rewrite Email->getAdditionalMailHeaderString to have only one string concatenation statement
2022-11-13 02:28:06 -05:00
Philipp 477bec1977
Fix some PHP8.1 issues if possible 2022-11-09 23:58:23 +01:00
Philipp b3f9cef94a
UserSession class [3] - Refactor src/ files excluding Module/Model 2022-10-21 19:35:32 +02:00
Michael 11944dda32 old boot.php functions replaced in various places 2022-10-19 07:44:08 -04:00
Roland Häder c36da392f8
Changed:
- re-added `null` again https://github.com/friendica/friendica/pull/11900#discussion_r979248182
- removed null coalescing operator
2022-10-18 18:21:45 +02:00
Roland Häder 2773ac9909
Changed according feedback:
- $posted_date should not allow NULL, instead use `?? ''` instead
- this happened in e.g. 2FA app-specific password listing
2022-10-18 17:47:15 +02:00
Roland Häder 66b9cace9f
Changed:
- first parameter can be null
2022-10-18 17:47:15 +02:00
Michael 62a0d55fc8 The friendica constants have been moved to the app class 2022-10-17 10:37:48 +00:00
Hypolite Petovan a10f55bb85
Merge pull request #11979 from annando/issue-11853
Notices
2022-10-09 17:45:33 -04:00
Hypolite Petovan a4b0ebf160 Add a couple of cases to DateTimeFormat::fix()
- Reworked method to perform more string replacements and fewer regular expression matches
2022-10-09 09:34:38 -04:00
Hypolite Petovan bee6506d33 Only call DateTimeFormat::fix() when there's an Exception
- This prevents valid date/time strings to be mangled by fix()
2022-10-09 09:34:30 -04:00
Hypolite Petovan 345d307ae0 Add tests for DateTimeFormat::fix() 2022-10-07 23:10:50 -04:00
Hypolite Petovan c0447ced48 Simplify method name for DateTimeFormat::fix 2022-10-07 23:10:50 -04:00
Michael 1ddeaaad4a And another weird date format 2022-10-07 19:56:02 +00:00
Michael 6b917718fd Juts another date format fix 2022-10-06 21:09:52 +00:00
Michael Vogel 0a7c9c66b5
Update src/Util/DateTimeFormat.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2022-10-03 19:04:49 +02:00
Michael 045238070b Issue 11938: Fix weird date formats 2022-10-03 16:12:22 +00:00
Michael a653c6350d Support for quoted links is added 2022-09-29 16:04:33 +00:00
Michael Vogel f08b08e0d8 Allow to reject specific languages on receiving posts via the relay 2022-09-19 12:36:12 +02:00
Michael 757a5c2de9 Loglevels are adjusted 2022-08-30 19:45:30 +00:00
Michael 3a840aa22d Some more warnings and erors are fixed 2022-08-28 19:27:21 +00:00
Michael 4e02c347b6 Handle array 2022-08-28 04:14:39 +00:00
Michael d54cf9cc21 Avoid warnings/fatal errors 2022-08-28 04:00:18 +00:00
Michael ceb88c10e6 Warnings/Errors reduced - improved relay processing 2022-08-27 08:08:58 +00:00
Hypolite Petovan 5f62a59d2f Ensure Util\Profiler->rendertime is bool
- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1221228589
- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1221244898
- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1221333918
2022-08-21 07:44:12 -04:00
Roland Häder 4c6940583a
Changes:
- added missing type-hints
- first access level, then static
- reformatted code following code-style
2022-08-19 19:12:30 +02:00
Roland Häder 88cdb695b1
Changed:
- double-quotes to single
- more space around concated strings
- removed TODO as there is sadly no IOException in PHP
2022-08-13 13:35:50 +02:00
Michael d60d2caef6 Improved queue processing 2022-08-07 19:24:50 +00:00
Michael 0971bcf165 Make the tests happy 2022-07-29 16:05:04 +00:00
Michael d12c9a8f58 Caching for fetched activities 2022-07-28 19:05:04 +00:00
Roland Häder 09cb4c1540
Revert "Added logging of unsupported meta-tag records" 2022-07-28 06:00:58 +00:00
Roland Häder 8fb0fa2921
Added logging of unsupported meta-tag records 2022-07-28 04:10:57 +02:00
Michael 8c602071c2 Bookwyrm posts now work 2022-07-23 12:50:15 +00:00
Michael 7dcd02938d Remove entries from queue / relay detection 2022-07-20 05:37:40 +00:00
Michael ac47aed1b4 Merge remote-tracking branch 'upstream/develop' into enqueue-posts 2022-07-18 05:32:44 +00:00
Hypolite Petovan 121607b8d9
Merge pull request #11740 from annando/json-ld
Improved JsonLD parsing
2022-07-17 17:44:53 -04:00
Michael 46fdd9893c Merge remote-tracking branch 'upstream/develop' into server-detection 2022-07-17 15:42:09 +00:00
Michael 9a4be84853 Only check for string value 2022-07-17 13:13:14 +00:00
Michael 2ddf37f32d Emergency fixes to fix a bunch of fatal errors 2022-07-17 11:47:12 +00:00
Michael 8b7cb5d9ef Merge remote-tracking branch 'upstream/develop' into server-detection 2022-07-16 12:44:21 +00:00
Michael 8db0e090d7 Merge remote-tracking branch 'upstream/develop' into json-ld 2022-07-16 09:33:24 +00:00
Michael 8cc362fb8b Improved JSonLD parsing 2022-07-16 09:25:12 +00:00
Michael abe3fd7605 Improved check for invalid certificates 2022-07-16 08:27:38 +00:00
Michael 896fd3fc91 Use the redirect value 2022-07-14 05:39:25 +00:00
Philipp 74c5c66cb5
Add docs 2022-07-13 00:27:39 +02:00
Philipp d74e57ef2c
include suggested changes 2022-07-13 00:23:12 +02:00
Philipp a910fd8864
Split DBStructure & View to avoid DB-calls and dependencies for basic operations
- new "Definition" classes vor DB and Views
- new "Writer" classes to create SQL definitions for DB and Views
- DBStructure & View are responsible to execute DB-querys
2022-07-12 23:40:31 +02:00
Michael cc75eb5d18 Improved server detection 2022-07-05 05:04:05 +00:00
Roland Häder 4164cdacf5
Changes:
- added type-hints
- added documentation
2022-06-25 16:48:37 +02:00
Hypolite Petovan a2afb101cd Fix off-by-one error in Message ID header count check in Util\Emailer 2022-06-25 05:35:24 -04:00
Roland Häder 82bb36e13d
Changes:
- Made Item::guidFromUri()'s $host parameter optional (allowing null)
- added some type-hints
- added documentation
- this may fix reported issue in #11630
2022-06-24 03:17:57 +02:00
Roland Häder 657a8a7cb5
Changes:
- documented null value
- two ' to much!
2022-06-23 17:30:17 +02:00
Roland Häder fd8f4269ff
Reformatted code 2022-06-23 17:30:17 +02:00
Roland Häder 5699b03e8d
Changes:
- added some nodes to OpenSearch descriptor
- still no UTF-8 encoding!
- added some type-hints
2022-06-23 17:30:16 +02:00
Roland Häder 57e741f2cf
More type-hints added 2022-06-23 17:30:15 +02:00
Roland Häder 182c3db9b8
Changes:
- added type-hints
- added missing documentation
2022-06-23 17:30:15 +02:00
Roland Häder 69a68be800
Added some missing type-hints 2022-06-23 17:30:13 +02:00
Roland Häder 7eefb9aed8
Changed:
- empty() is maybe superflous here, still I would prefer a code style that is
  written explicitly and not rely on "magic casting"
2022-06-22 18:57:01 +02:00
Roland Häder 15d8341d9a
Converted multiple single-comment (//) to multi-line comment block (/* */) 2022-06-22 18:06:35 +02:00
Roland Häder eb231bc548
Fixed: ?? didn't work here as bool won't be seen as null 2022-06-22 17:09:53 +02:00
Roland Häder d5441da49a
Fixed:
- TypeError: "Argument 1 passed to Friendica\Util\XML::escape() must be of the
  type string, null given, called in src/Util/XML.php line 171
2022-06-22 16:20:26 +02:00
Roland Häder feec96cbc4
Return empty array on error (I hope it works this way). 2022-06-22 14:36:47 +02:00
Roland Häder 74ab7648c6
Changes:
- addHubLink()'s 2nd parameter is DOMElement
- added more type-hints
- converted double-quotes to single
2022-06-22 14:36:46 +02:00
Roland Häder 12add2fb64
$data can turn into bool here 2022-06-22 14:36:46 +02:00
Roland Häder 08f55f0358
Ops, forgot to rename these, too. 2022-06-22 14:36:46 +02:00
Roland Häder 84bfc37bf1
Changes:
- added more type-hints
- added missing documentation
2022-06-22 14:36:45 +02:00
Roland Häder 5fe428d3e4
Fixed:
- PHPUnit\Framework\Error\Notice:  Undefined index: language in /.../src/Util/EMailer/MailBuilder.php on line 122
2022-06-21 13:47:40 +02:00
Roland Häder 44a9ec9b17
Rewrite:
- avoid having array|string for $table to have a "string" type-hint for $table
- you now have to do it for yourself by giving 'schema.table' as parameter
2022-06-21 13:47:38 +02:00
Roland Häder f1867463a0
Changes:
- added more type-hints
2022-06-21 13:47:37 +02:00
Roland Häder 3e522ed512
Fixed:
- prevent NULL from being handled over to XML::escape()
- still I wonder that an object can be? It is a string-only accepting method
2022-06-21 01:42:37 +02:00
Roland Häder b6fa022a73
Changes:
- added type-hints
- added some documentation
- marked some generic methods to be moved to Util\Strings class instead
2022-06-20 23:50:24 +02:00
Roland Häder a0c8fc6d6e
Changes:
- added more type-hints
2022-06-20 02:48:02 +02:00
Roland Häder bff57bb030
Changes:
- added type-hints
- added returned type-hints in interface (I checked all)
2022-06-19 14:00:31 +02:00
Roland Häder 33768ea1c6 Some fixes:
- $gsid's default value cannot sadly be 0, it now must be null to allow some
  code work
- added some more type-hints
- documented a bit more
2022-06-17 17:18:31 +02:00
Roland Häder dd54e52575 MrPetovan brought the right one up:
> Since this is depending on remote systems, the log can quickly fill with unactionable messages.
2022-06-17 17:18:31 +02:00
Roland Häder 6035de6883
Continued:
- added more type-hints
- also cannot return FALSE when array is set
2022-06-16 19:06:41 +02:00
Michael 3444c29b0b Avoid warning "Undefined namespace prefix" 2022-05-21 06:04:34 +00:00
Michael f6167b4cfd New function to exit the program 2022-05-18 02:13:54 +00:00
Michael 4016a576d5 Log the execution time 2022-05-17 20:47:23 +00:00
Michael f8d929d94e Ensure to set the network timeout 2022-05-14 09:53:12 +00:00
Michael 4b5a743645 Handle timeout 2022-05-14 05:38:01 +00:00
Michael 0f0b649e8d Replace unparse function 2022-05-11 11:06:14 +00:00
Michael 020ba7a4ed The function is now usable for all formats 2022-05-11 06:58:26 +00:00
Michael 695e3d8b61 Simplifiy the split 2022-05-11 06:55:02 +00:00
Michael 47808ab0e9 Issue 11487: IDN support added 2022-05-11 06:34:25 +00:00
Hypolite Petovan 510dacf4df Escape BBCode tag parsing avoidance tags when processing abstracts
- Improve documentation for related methods
2022-05-07 22:19:50 -04:00
Michael 40aa67f8be Bulk transmission for AP posts 2022-05-02 05:15:27 +00:00
Michael 9eafcf8484 Update contact when the avatar hadn't been found 2022-04-28 16:46:52 +00:00
Michael 990eea2c4e We now store uncommon endpoints 2022-04-25 13:45:03 +00:00
Hypolite Petovan 4eecf733e1
Merge pull request #11389 from nupplaphil/feat/http_client_arg
Introduce explicit HttpClient "Accept" parameter
2022-04-08 15:05:40 -04:00
Philipp 3033f79529
head fixings 2022-04-08 20:48:57 +02:00
Philipp 04866195b4
Remove accept parameter for head/post again 2022-04-03 19:33:09 +02:00
Michael 5290f0cd51 Improved handling of invalid links 2022-04-03 07:31:42 +00:00
Michael 029daef997 Only use and accept valid http links as links to an external resource 2022-04-03 07:21:36 +00:00
Philipp e299fc67c8
Introduce "accept_header" as specific argument to the http client 2022-04-02 21:16:53 +02:00
Philipp 73c3b21665
Move ACCEPT constants to own "enum" class 2022-04-02 20:26:11 +02:00
Michael 908d2594ed Use "HttpClientOptions" 2022-03-29 08:57:38 +00:00
Michael 1fae0123ec Some more "accept" parameters are added 2022-03-29 06:24:20 +00:00
Michael ff70f74952 "accept" constants introduced and used 2022-03-28 10:33:06 +00:00
Michael 6f43821ebf Issue 11368: Prevent namespace prefix warning 2022-03-22 21:07:35 +00:00
Hypolite Petovan 17d49422b4 Hash the URL before using it as cache key in Util\Images::getInfoFromURLCached
- This prevents oversized URL from stunting the database cache
2022-02-18 09:19:36 -05:00
Michael Vogel 6bc69f3353 Workaround for timing problems / Avoid a notice in the scheduled posts 2022-02-12 18:27:58 +01:00
Michael c5337c81e7 Improve contact search speed / assume octet-stream on missing content type 2022-01-27 04:05:11 +00:00
Michael 43b9e39c6a Lemmy support added 2022-01-22 15:24:51 +00:00
Michael dbd6d10536 Issue 8845: Signature support for "created" and "expires" added 2022-01-21 15:38:33 +00:00
Michael 95f085b7ac API: The legacy API finally moved 2022-01-15 21:38:19 +00:00
Philipp 543e4be0a6
Replace 'REQUEST_METHOD' with App\Arguments::getMethod() 2022-01-04 20:59:28 +01:00
Philipp dc46af5ea1
Automatically return allowed HTTP methods for OPTIONS per specific endpoint 2022-01-04 20:59:27 +01:00
Balázs Úr 733f3de9ed Add missing copyright text 2022-01-02 10:49:50 +01:00
Philipp 322b7c856c
Merge pull request #11129 from urbalazs/copyright-2022
Update copyright
2022-01-02 09:45:35 +01:00
Balázs Úr e56a53647b Update copyright 2022-01-02 08:27:47 +01:00
Michael Vogel 076b054a63 Fix for ParseUrl ('type' was already in use) 2021-12-09 01:20:31 +01:00
Michael d6c97dbde2 Fix attachment handling 2021-12-08 13:32:20 +00:00
Hypolite Petovan ecaed2a845 Update DateTimeFormat documentation
- Remove an explicit default value parameter
2021-12-04 17:52:01 -05:00
Michael 34260fc619 Improved page info detection 2021-12-04 19:54:33 +00:00