Commit graph

165 commits

Author SHA1 Message Date
Michael 896fd3fc91 Use the redirect value 2022-07-14 05:39:25 +00:00
Philipp Holzer d74e57ef2c
include suggested changes 2022-07-13 00:23:12 +02:00
Philipp Holzer 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 dad05f1c76 Only fetch the first word for the platform 2022-07-10 13:52:38 +00:00
Michael 85c7bacb00 Improved server detection 2022-07-10 13:01:47 +00:00
Michael cc75eb5d18 Improved server detection 2022-07-05 05:04:05 +00:00
Hypolite Petovan aa133b5437 Add explicit gserver.site_name string truncate in Model\GServer
- Avoids "Data too long for column 'site_name'" database errors
2022-06-25 06:25:48 -04:00
Hypolite Petovan 636b84b41c Update return value type-hint of GServer::getProtocol
- Address https://github.com/friendica/friendica/issues/11630#issuecomment-1164880874
2022-06-25 05:06:22 -04:00
Roland Häder fd8f4269ff
Reformatted code 2022-06-23 17:30:17 +02:00
Roland Häder e96a548286
Changes:
- dumped default value for $input
- added unknown 'platform' which prevents an "Undefined index: platform in
  /var/www/.../src/Model/GServer.php on line 940" error
2022-06-20 18:56:22 +02:00
Roland Häder c0d7f8944d
Some calls saved 2022-06-19 11:26:10 +02:00
Roland Häder 8ba3f13fae
Changes:
- added more type-hints
- added missing documentation
2022-06-18 17:09:46 +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
Michael 30e5ef928a Avoid wrong server type detection / Owncast added 2022-04-12 05:34:34 +00:00
Michael 62367923e0 Fix several notices 2022-04-11 18:57:30 +00:00
Philipp Holzer e299fc67c8
Introduce "accept_header" as specific argument to the http client 2022-04-02 21:16:53 +02:00
Philipp Holzer 73c3b21665
Move ACCEPT constants to own "enum" class 2022-04-02 20:26:11 +02: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 2f97d61a09 Estimate active server users when not provided by the system 2022-03-10 21:50:00 +00:00
Michael 92a71f8c27 Store wekk/month&halfyear usage / number of posts 2022-02-06 20:03:19 +00:00
Michael 8b585c6ccc Set the timeout to 10 seconds 2022-02-06 10:07:18 +00:00
Michael b3da88ceaa Don't assume AP with Wordpress 2022-02-06 09:21:14 +00:00
Michael 85f029a724 Enforce probing 2022-02-06 09:03:48 +00:00
Michael f1cac5170b mark sites as "phantom" that are up but couldn't be detected 2022-02-06 08:02:19 +00:00
Michael ea2faa28fe Use first word as platform / improvements for registered users 2022-02-06 05:59:47 +00:00
Michael 650f90df25 Platforms: only use and show trusted detections 2022-02-05 22:14:19 +00:00
Michael Vogel 3a96a97189
Update src/Model/GServer.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
2022-02-05 16:01:04 +01:00
Michael 1564447b8c Detect pump.io servers 2022-02-05 11:25:06 +00: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 3c2e1db19f Don't compare with an empty redirect url 2021-12-18 10:07:16 +00:00
Michael 11e8ae52e0 Issue 11109: Fix server detection 2021-12-18 09:59:30 +00:00
Hypolite Petovan 41062eb7e4 Add new purge contacts option to admin server blocklist
- Move adding a server domain pattern to the blocklist in a separate module to allow reviewing the list of known servers that would be affected
2021-11-06 01:36:53 -04:00
Philipp Holzer 409d909d0f
Restructure HTTPClient for new paradigm 2021-10-28 20:01:03 +02:00
Michael a0c1c3f661 Fix notice "Array to string conversion" 2021-10-25 20:54:36 +00:00
Michael 27b9da3df5 replace "p" with higher level database functions 2021-10-12 05:53:29 +00:00
Philipp Holzer 13a91e63aa
Rename DI::httpRequest() into DI::httpClient() 2021-08-25 21:54:54 +02:00
Philipp Holzer 505100bdd7
Rename HTTPRequestOptions to HTTPClientOptions 2021-08-25 21:45:15 +02:00
Philipp Holzer 0cafa871f1
Use HTTPRequestOptions constants for HTTPClient::get() 2021-08-25 21:31:30 +02:00
Philipp Holzer a3d0404290
Fix curResult::getHeader() in GServer.php 2021-08-25 14:22:43 +02:00
Philipp Holzer 2356221aba
Fixup HTTP headers for httpClient requests 2021-08-25 14:22:43 +02:00
Philipp Holzer 05ecd1e3d4
Replace IHTTPResult for CurlResult usages 2021-08-20 19:58:42 +02:00
Hypolite Petovan 302070875c Ensure nodeinfo-provided protocols are strings in Model\GServer::parseNodeinfo2
- https://github.com/friendica/friendica/issues/10168#issuecomment-828281803
2021-05-31 00:47:03 -04:00
Michael 5a00902e11 Avoid HTML parsing of an empty body 2021-04-10 05:46:19 +00:00
Balázs Úr 054c301ef0 Update copyright 2021-03-29 08:40:20 +02:00
Michael 9e87dcb25b We now set the protocol in "gserver" on receiving as well 2021-03-10 22:31:33 +00:00
Michael 050f31eeb3 Don't try legacy if the server supports more 2021-01-10 19:08:23 -05:00
Michael bf563a1a39 Store the server transport protocol 2021-01-10 19:08:23 -05:00
Michael ae8a376eab Fix wrong variable 2020-12-22 08:24:56 +00:00
Michael a5096ea549 Server detection: Handle redirects, better Peertube detection 2020-12-22 08:12:36 +00:00
Michael 9acecfd9e6 Issue 9630: Prevent negative values for registered users 2020-12-06 18:14:05 +00:00
Michael 8d999f54d0 Check and add a server 2020-12-03 22:32:51 +00:00
Michael edbdfbae6b workerqueue now has a "command" field 2020-12-03 15:47:50 +00:00
Michael 303aaa00ca Mode switch for insert 2020-11-19 19:34:48 +00:00
Michael 0384bf3e76 Relay code reworked to support AP delivery 2020-11-15 23:28:05 +00:00
Philipp Holzer a74d88c4ee
Remove 'headers' option occurrences and add a warning if used. 2020-10-18 22:31:26 +02:00
Philipp Holzer a6fc9cd32e
Remove $binary flag for HTTPRequest::get(), HTTPRequest::fetch(), HTTPRequest::fetchAll() (deprecated since PHP 5.1.3) 2020-10-18 20:56:31 +02:00
Philipp Holzer b70b9d1139
Revert "Replace IHTTPResult for CurlResult usages"
This reverts commit 97167d7b
2020-10-11 23:26:17 +02:00
Philipp Holzer 97167d7b90
Replace IHTTPResult for CurlResult usages 2020-10-10 23:11:30 +02:00
Michael 23b7da3664 Removed unused PoCo functionality 2020-08-31 12:40:23 +00:00
Michael 0c73531da1 Poco and gcontact (mostly) removed 2020-08-01 16:15:18 +00:00
Michael a9a9f7d51d Update the last query at a single place 2020-08-01 08:56:07 +00:00
Michael bb70258d48 Discovery of peers of other servers 2020-08-01 05:55:27 +00:00
Hypolite Petovan ec3ec3b78a Replace remaining occurrences of Network::curl 2020-07-21 21:39:59 -04:00
nupplaPhil 657d08f09f Rename "fetchUrl" and "fetchUrlFull" to "fetch" and "fetchFull" 2020-07-21 03:15:53 -04:00
nupplaPhil 7029012f27 Rename "HTTPRequest::curl()" to HTTPRequest::get() 2020-07-21 03:14:01 -04:00
nupplaPhil 1aa07f87a4 Make "HTTPRequest::fetchUrl" dynamic 2020-07-21 03:04:58 -04:00
nupplaPhil 2973ed6448 Make "HTTPRequest::curl" dynamic 2020-07-21 03:01:12 -04:00
nupplaPhil 5344efef71 Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest" 2020-07-21 02:56:10 -04:00
Michael 39ffb3e745 Remove debug output 2020-07-20 08:02:34 +00:00
Michael 5bf813d0ec Use "failed" field 2020-07-19 11:42:23 +00:00
Michael 1532f0d529 New field "failed" for gserver, gcontact and contact 2020-07-19 01:15:57 +00:00
Michael d6bf7f2cda Replace "Probe::uri" with "Contact::getByURL" 2020-07-16 10:22:14 +00:00
Michael 8ec2b21a14 Abuse mail received because of "unusual traffic"
Fixes friendica/friendica#8663
2020-06-14 15:47:47 +00:00
Michael 465e1890b5 Fix notice because of missing array item 2020-05-27 03:19:17 +00:00
Michael 071505f024 Added documentation, simplified code 2020-05-22 04:52:43 +00:00
Michael 95b4f35a12 Improved server detection / gsid introduced 2020-05-22 04:19:32 +00:00
Michael a77c0194dc Issue 8663: Prevent abusive behaviour when probing servers 2020-05-20 06:57:46 +00:00
Michael bc26c980f0 Reverts test changes 2020-05-17 13:59:05 +00:00
Michael d771c50d63 Issue 8565: Sanitize input data
Fixes #8565
2020-05-17 06:13:58 +00:00
Michael f521689ced Suppress XML logging of errors 2020-04-27 14:35:50 +00:00
nupplaPhil 23c64b9a11
Add license info at Friendica classes 2020-02-09 15:45:36 +01:00
Philipp Holzer ed9392469e
Remove unneeded Config namespace usages 2020-01-19 22:50:44 +01:00
Philipp Holzer 21640ec5d8
Add missing Friendica\DI namespace to files (PHPStorm inspection) 2020-01-19 21:26:42 +01:00
Philipp Holzer 3411ced833
Move Config::set() to DI::config()->set() 2020-01-19 21:21:53 +01:00
Philipp Holzer 6c36fd9e01
Move Config::get() to DI::config()->get() 2020-01-19 21:21:13 +01:00
Michael bc83eb5c4e Improved server platform detection 2020-01-13 05:57:05 +00:00
Michael 7b060aa3f5 User lowercase for platform data 2020-01-12 21:07:40 +00:00
Michael 9c4f3763ae Improved test for invalid systems 2020-01-12 12:50:00 +00:00
Michael 8878b3864f Fix an error and a notice 2020-01-05 02:19:02 +00:00
Michael fb550a0172 Relocated functions from PortableContact to GServer 2020-01-01 21:29:36 +00:00
Michael 73b82d1455 Don't add contacts when not needed 2020-01-01 17:54:36 +00:00
Hypolite Petovan efadab66c5 Update wrong/missing references to classes 2019-12-29 21:51:16 -05:00
Michael 8608e8ff63 Standards 2019-12-24 05:04:11 +00:00
Michael 90408b9d49 Discover directory type 2019-12-21 13:48:20 +00:00
Michael fab85255b6 Relocated functions 2019-12-21 06:39:22 +00:00
Michael Vogel 100dfea524 Fix further notes and warnings 2019-11-19 11:02:35 +01:00
Michael Vogel 80917018e9 Fix warnings 2019-11-18 19:09:21 +01:00
Hypolite Petovan 146646c4d4 Replace deprecated calls to defaults() by ?? and ?: in src/ 2019-10-16 08:38:52 -04:00