Commit graph

924 commits

Author SHA1 Message Date
Michael 992b6eed1d Fixed test - again 2023-05-10 16:57:08 +00:00
Michael Vogel 45dda2c064
Update src/Util/Images.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2023-05-10 17:06:16 +02:00
Michael 3554b61508 Fix tests 2023-05-10 08:48:21 +00:00
Michael c5ca5bfdf8 Function renamed 2023-05-10 07:54:15 +00:00
Michael 7d91cc73de Unifiy the creation of photo links 2023-05-09 20:44:58 +00:00
Michael d1af85b27f Handle exception on "head" / missing class variable added 2023-04-11 02:11:39 +00:00
Philipp Holzer 9c375e6460
Fix DateTimeFormat issue 2023-04-03 18:42:41 +02:00
Josh Soref 2b819b8f8c spelling: resource
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 20:04:18 -04:00
Josh Soref e1be88579e spelling: read
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 20:04:18 -04:00
Josh Soref 65730ffa86 spelling: proxified
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 20:04:18 -04:00
Josh Soref 9c86578755 spelling: associative
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 18:02:15 -04:00
Josh Soref 40094bbda7 Rewrite getBytesFromShorthand prose 2023-03-26 16:14:16 -04:00
Josh Soref 2d5b2a1fef spelling: utilities
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:14:16 -04:00
Josh Soref 067c1c2679 spelling: using
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:14:16 -04:00
Josh Soref aa9ff41311 spelling: suppressing
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:14:16 -04:00
Josh Soref 3fcd546151 spelling: structure
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:14:16 -04:00
Josh Soref a3f4fe1ee9 spelling: shorthand
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:14:16 -04:00
Josh Soref d3e3a81256 spelling: proxify
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:14:16 -04:00
Josh Soref 39a5bfc0c0 spelling: parameter
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:14:16 -04:00
Josh Soref 3b173f2007 spelling: nonexistent
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:14:15 -04:00
Josh Soref 2172d44c33 spelling: maybe
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:14:15 -04:00
Josh Soref da34800728 spelling: into
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:11:27 -04:00
Josh Soref 60d9d7f5e0 spelling: occurrences
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:03:23 -04:00
Josh Soref 9581b05603 spelling: cached
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:03:22 -04:00
Josh Soref 980b4ec273 spelling: already
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:03:22 -04:00
Josh Soref 1281f118bb spelling: algorithm
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-26 16:03:22 -04:00
Michael 1a98961c3c Issue 12858: Peertube avatars can now be fetched 2023-03-18 06:41:35 +00:00
Michael 6e3602591d Use "Exception" 2023-02-26 22:43:45 +00:00
Michael 2b513a48c7 Catch all errors thrown by "fetchRaw" 2023-02-26 14:08:33 +00:00
Philipp Holzer f0c29edcde
Adapt BaseURL calls to new UriInterface 2023-02-18 21:12:21 +01:00
Michael baf75adfca Some loglevels are adjusted to more reasonablöe levels 2023-02-16 20:47:37 +00:00
Hypolite Petovan b66787f0de Improve return value consistency in Util\BasePath::getPath 2023-01-28 22:19:47 -05:00
Hypolite Petovan 1dc97e30e0 Read local files instead of performing self HTTP requests in JsonLD::documentLoader 2023-01-28 22:17:05 -05:00
Hypolite Petovan 7e618856ab Replace deprecated use of "self" in callables
- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1383147421
2023-01-21 14:25:21 -05:00
Philipp Holzer ab6efea9b2
Replace Config-Cache dependency with Config-Model (no more DB-waiting necessary) 2023-01-15 16:17:08 +01:00
Hypolite Petovan a7d0355849
Merge pull request #12659 from DanielSiepmann/12658-fix-feed-urls-with-whitespace
Properly handle feed item urls with surrounding whitespace
2023-01-12 07:57:30 -05:00
Daniel Siepmann 6633b0af4b
Properly handle feed item urls with surrounding whitespace
Some feeds might have whitespace around the URLs of each item.
This can't be handled by parse_url.
Therefore the incoming url is trimmed to not contain any surrounding
whitespace for proper handling.

Relates: #12658
2023-01-12 13:47:57 +01:00
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 Holzer 477bec1977
Fix some PHP8.1 issues if possible 2022-11-09 23:58:23 +01:00
Philipp Holzer 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