319 Commits

Author SHA1 Message Date
Mario
3d29c498e9 move unparse_url() to Url class, also move tests 2026-04-29 14:16:15 +00:00
Harald Eilertsen
7f98cd606b Remove custom CA certs
The included collection of CA certificates has not been updated since
2021, which means it's outdated and possibly a security risk. Also it
should not be necessary, as curl is able to find the system installed CA
certs which is more likely to be up to date and safer.
2026-03-25 18:06:39 +01:00
Mario Vavti
86d58065b3 deal with leading or missing @ and add more tests 2026-03-04 10:25:32 +01:00
Mario
4474fdd4f9 introduce parse_webbie() with basic tests 2026-03-04 08:34:45 +00:00
Mario
b3526415f9 allow to override curl useragent 2026-03-03 10:59:11 +00:00
Mario
28746891c8 curl_close() is deprected and noop since PHP version 8.0 2025-12-16 11:47:10 +00:00
Mario
c8c9e4a901 fix some of the constant not found errors 2025-10-21 16:00:06 +00:00
Mario
1a3ca49eba apply downstream fix from streams: do not sign (request-target) on response 2025-06-23 09:10:57 +00:00
Mario
fcf42eeae0 Revert "rfc9421 verify: parse more fields if applicable"
This reverts commit 721c0b1e5b.
2025-06-23 09:02:08 +00:00
Mario
721c0b1e5b rfc9421 verify: parse more fields if applicable 2025-06-23 08:59:27 +00:00
Mario
7c59dd9fd7 more deprecate x() 2025-04-23 18:17:23 +00:00
Mario Vavti
7fb13f23fe fix docu 2025-02-26 16:37:22 +01:00
Mario Vavti
9eff1a08d4 refactor unparse_url() to allow to return a custom field set only and add tests 2025-02-26 16:26:40 +01:00
Mario Vavti
9e2f3dc05f fix more issues reported by phpstan 2024-11-27 10:25:37 +01:00
Harald Eilertsen
3a2f787f96 Add Zotlabs\Lib\Mailer class to replace z_mail function. 2024-11-22 09:59:14 +00:00
Harald Eilertsen
5b7f8d986c Fix #1879: Emails with + in local part was rejected. 2024-11-16 13:45:36 +01:00
Mario Vavti
45c0091d3d more work on porting containers from streams 2024-10-09 18:17:37 +02:00
Harald Eilertsen
66ea277045 Refactor is_local_url() and add api doc. 2024-06-16 08:56:20 +02:00
Mario
388e7c88df remove superfluous param, fix wrong var and declare types for unparse_url() 2024-06-10 08:22:43 +00:00
Harald Eilertsen
c009c5f43a Fix default timeouts for z_(fetch|post)_url.
When fetching the default timouts from config, the result is converted
to an int via `intval()`, the result of that again is compared strictly
to `false`. Since 0 !== false, the default values will never be used,
and 0 (no timeout) is passed to curl.

This cause requests to hang indefinitely (or until they are killed) when
receiving actions that require a lookup or fetch to another site as part
of the request processing. (E.g webfinger, or fetching objects that we
received an announce action for.) This again cause the request never to
return a useful status to the site sending the action, and could cause
them to think the Hubzilla site is dead.

This patch fixes this by comparing the fetched value from config to 0
instead of false, making the defaults work again if the config is not
set (or set to 0).
2024-05-29 22:50:02 +02:00
Harald Eilertsen
0dc959d9fe Deprecate *_config() functions in core. 2024-03-24 09:58:21 +00:00
Mario
46fa26502b more work on emojis 2024-03-09 20:53:18 +00:00
Harald Eilertsen
80ed2ff89a Add some beginning tests for bbcode, and a bit of refactoring 2024-03-01 16:18:07 +00:00
Harald Eilertsen
403539919a Improve the validate_email function
The validate_email function relied on doing an actual domain lookup (on
supported platforms) to validate the domain of the email address. This
does not work too well in testing environments where we may not want to
spam the DNS system, if it at all is available.

Apart from the the function did very little to actually verify that it
was a valid email address.

This patch tries to change that by usng a somewhat stricted regex based
validation. While this may not be perfect, it should be good enough in
the vast majority of cases. For platforms where no validation was
performed with the old version, it will at least be an improvement.

Also, it allows testing without having an external network connection.

Also clarify the doc comment, that it does not actually try to resolve
the email address, just the domain.
2024-01-15 19:52:31 +01:00
Mario
aac406a245 provide some more jsonld builtins 2024-01-11 16:27:57 +00:00
Mario
58593d7da6 prepare outbound fep-8b32 (object integrity) but do not enable yet since the additional context seems to break ldsig for some reason, introduce Activity::build_packet() and Activity::ap_context() to reduce code duplication, implement fep-2c59 (webfinger) and some cleanup 2024-01-10 13:33:57 +00:00
Mario
150174c3bb jsonld: return object instead of json string 2023-09-21 08:33:17 +00:00
Mario
3708c1ac8c fix regression in jsonld_document_loader() 2023-09-16 10:51:28 +00:00
Mario
931b876b44 fix cached jsonld files fetched via network 2023-07-21 12:07:17 +00:00
DM42.Net Hubzilla Development
ba2d775215 Skip logging when DB functions are not yet loaded (logging requires db lookup). 2023-07-17 20:34:16 -04:00
Mario
0c2cb18578 shuffle queue deliveries for more randomness 2023-06-08 15:33:02 +00:00
Mario Vavti
c9e170dfcc queueworker: introduce new interval config queueworker.queue_interval - defaults to 500000 microseconds. No config UI yet. 2022-12-12 23:26:45 +01:00
Mario
e3a19469eb bring back poll and delivery interval 2022-12-12 09:03:49 +00:00
Mario
2bb58843ab move queueworker to core and bump version 2022-12-02 19:22:19 +00:00
Mario
1d56b9a1bb php8: warning fixes 2022-09-14 12:31:19 +00:00
Harald Eilertsen
b02f6a1dae Add function is_local_url() to check if url is local. 2022-03-20 15:34:24 +01:00
Mario
139ffae367 fix another deprecation warning 2022-02-11 09:51:21 +00:00
Mario
e74359fcfe 3rd arg in str_replace() can not be null 2022-02-11 09:10:19 +00:00
Mario
f06c970628 port z_curl_error() from zap 2022-01-23 20:23:40 +00:00
Mario
532b479f96 provide local copies of the w3.org jsonld documents - addresses issue #1637 2021-10-14 18:15:38 +00:00
Mario
1fa4bc9ac0 remove most legacy zot quirks 2021-05-26 12:18:59 +00:00
Malendur
300679c053 Fix phpDoc 2021-05-20 08:23:45 +00:00
Max Kostikov
11d831e4d7 More PHP 8 fixes 2021-03-10 11:14:02 +00:00
Mario
b242347fa1 onepoll via zot6 to /zotfeed which implements an outbox 2021-01-20 20:17:50 +00:00
Mario
7684861249 do not check against undefined variable 2021-01-02 21:37:06 +00:00
Mario
685c569eaf minor queue adjustments 2020-11-13 13:49:39 +00:00
root
0ad7c8f69e HTML parsing lib change to standard PHP in scrape_feed() and scrape_vcard()
(cherry picked from commit 16d450fc6980bb70f13e574d1b20406dd313110e)
2020-10-31 09:15:37 +01:00
Mario
45a5a04189 do not overwrite $x variable 2020-10-13 09:03:13 +00:00
nobody
e529635952 delete fixes 2020-09-30 17:05:36 -07:00
zotlabs
13ff9a897d foreach warning 2020-07-22 16:20:36 -07:00