Commit graph

46 commits

Author SHA1 Message Date
Philipp Holzer 5879535822
Switch static::$parameters to $this->parameters 2021-11-14 23:49:07 +01:00
Philipp Holzer 489cd0884a
Make BaseModule methods dynamic 2021-11-14 23:49:06 +01:00
Philipp Holzer 714f0febc4
Replace $parameters argument per method with static::$parameters 2021-11-14 23:49:05 +01:00
Michael 4236a9a105 Improved http error handling 2021-10-29 23:21:07 +00:00
Michael bdb5aa6bd9 Make the proxy functionality optional 2021-09-09 12:40:19 +00:00
Philipp Holzer 2356221aba
Fixup HTTP headers for httpClient requests 2021-08-25 14:22:43 +02:00
Michael 4bc3e8c141 Don't send "accept" when we accept anything 2021-08-06 04:02:22 +00:00
Michael 844727dc19 Simplyfying code 2021-07-05 04:16:02 +00:00
Michael e519b782fd Simplified proxy handling 2021-07-04 21:24:49 +00:00
Michael 24f013a654 Redirecting not logged in user instead of failing 2021-07-04 11:53:49 +00:00
Michael da484a48e3 Proxy: Avoid access for not logged in users 2021-07-04 10:55:32 +00:00
Michael b46b7b08ba Reduce the usage of the "proxifyUrl" function 2021-06-27 11:50:10 +00:00
Balázs Úr 054c301ef0 Update copyright 2021-03-29 08:40:20 +02:00
Michael 0bc1ebe5bf Only set file permissions when configured 2021-03-13 11:37:11 +00:00
Roland Häder 5de0008b48
Removed default values.
Signed-off-by: Roland Häder <roland@mxchange.org>
2021-03-11 12:45:59 +01:00
Roland Häder 15fd6822e4 Ops, missing ";"
Signed-off-by: Roland Häder <roland@mxchange.org>
2021-03-11 12:41:33 +01:00
Roland Häder 736045c67d Code changes for #10020:
Added ability to set chmod (default: 0640) for "proxified" files (downloaded to
/proxy/ directory). This allows customization, e.g. if people want 0600 instead
without changing the code.

Signed-off-by: Roland Häder <roland@mxchange.org>
2021-03-11 12:41:33 +01:00
Michael a331a8cf0a Delete removed contacts 2020-12-15 22:56:46 +00:00
nupplaPhil 85dc9bb96b
Add license info at Friendica PHP files 2020-02-09 16:18:46 +01:00
Philipp Holzer d6efc90194
cleanup namespace usages for L10n 2020-01-19 16:31:33 +01:00
Michael 0a4119adaf @brief is removed completely 2020-01-19 06:05:23 +00: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
Michael 8c03bdada9 parameters now are having a default value and are optional 2019-11-05 21:48:54 +00:00
Michael bd62d548db Added parameters 2019-11-05 20:22:54 +00:00
Hypolite Petovan f59ea2af55 Replace deprecated defaults() calls by ?? and ?: operators in src/Module/ 2019-10-15 09:20:32 -04:00
Michael 1c8dd457cc Just some added logging to the proxy functionality to better analyze problems 2019-10-06 18:48:33 +00:00
Michael 18807ae21d Don't send blank pictures on error, fail instead. 2019-10-01 12:41:49 +00:00
Hypolite Petovan 41f781c52a Replace System::httpExit() by HTTPException throwing 2019-05-02 11:37:09 -04:00
Philipp Holzer 07ba1b200c
Add routes for current BaseModules 2019-05-01 21:29:04 +02:00
Michael a876c20850 Use HTTP-Signature to authenticate when fetching photos. 2019-03-18 22:33:20 +00:00
Hypolite Petovan 7f2dc40601 Fix potential bugs without expected behavior change
- Fix uninitialized variables
- Fix potentially not set variables
- Fix wrong parameter default value
- Fix method scope
- Fix missing return value
2019-01-21 11:04:19 -05:00
Hypolite Petovan 4a95ca280d Remove unused code
- Remove commented code
- Remove unused/immediately overwritten variables
- Remove extraneous parameters
- Remove unreachable code
- Remove duplicate array keys
2019-01-21 10:48:40 -05:00
Hypolite Petovan cb3f09ae4f Refactor namespaces
- Remove unused use statements
- Add required use statements
- Escape global classes
2019-01-21 10:43:42 -05:00
Hypolite Petovan 3282ce5389 Fix PHPDoc comments project-wide 2019-01-21 10:35:51 -05:00
fabrixxm e561fb3a0b Fix undefined var in module Proxy 2019-01-21 10:00:47 -05:00
fabrixxm 36f30533b7 Code standards 2019-01-21 09:11:40 -05:00
fabrixxm 5fdc9097a2 Rewrite Proxy module 2019-01-21 09:11:40 -05:00
vinzv cb75c40f4e adapted profile pic resize to 300px for whole system 2018-10-23 16:36:57 +02:00
Jonny Tischbein 45e5a7f59f remove unsed require_onces of security.php 2018-10-17 18:39:27 +02:00
Philipp Holzer ffbc688797
Curl Response Refactoring
- refactored Network::getCurl()
- replaced every Network::getCur() execution with a Curl Response
2018-10-10 21:50:13 +02:00
Philipp Holzer 5a02e39a65
Rename App Methods
- renamed a lot of App methods to CamelCase
- replaced direct public variables with get-/set-Methods
2018-10-10 00:16:06 +02:00
Michael e9a73e4480 Fix fatal error due to missing "use" 2018-09-06 13:27:03 +00:00
Michael 380eeaab88 Still there had been notices - must have a good camouflage 2018-08-31 05:08:22 +00:00
Michael 2079caea14 Issue 3501: Mail contacts can be added again 2018-08-26 19:49:39 +00:00
Michael Vogel c72c64a6d8 Notices again (#5543)
* And again notices

* Notices in the directory

* Much more places

* Fix some double $

* Notice in ping

* Missing field

* Fix: We now remove deleted users from the directory

* Some more stuff

* Notices when removing users

* Added logging

* More logging

* Two more
2018-08-02 07:21:01 +02:00
Roland Häder 4d39164c1e [WIP] Rewrite to Proxy class: (#5507)
* Rewrite to Proxy class:
- introduced new Friendica\Network\Proxy class for in exchange of proxy_*()
  functions
- moved also all PROXY_* constants there as Proxy::*
- removed now no longer needed mod/proxy.php loading as composer's auto-load
  will do this for us
- renamed those proxy_*() functions to better names:
  + proxy_init()           -> Proxy::init()         (public)
  + proxy_url()            -> Proxy::proxifyUrl()   (public)
  + proxy_parse_html()     -> Proxy::proxifyHtml()  (public)
  + proxy_is_local_image() -> Proxy::isLocalImage() (private)
  + proxy_parse_query()    -> Proxy::parseQuery()   (private)
  + proxy_img_cb()         -> Proxy::replaceUrl()   (private)

* Ops, need to set $a here ...

* CR request:
- moved Proxy class to Friendica\Module
- extended BaseModule

* Ops, no need for own instance of $a when self::getApp() is around.

* Proxy-rewrite:
- proxy_url() and proxy_parse_html() are both non-module functions (now
  methods)
- so they must be splitted into a seperate class
- also the SIZE_* and DEFAULT_TIME constants are both not relevant to module

* No instances from utility classes

* Fixed error:
- proxify*() is now located in `Friendica\Util\ProxyUtils`

* Moved back to original place, ops? How did they move here? Well, it was not
intended by me.

* Removed duplicate (left-over from split) constants and static array. Thank to
MrPetovan finding it.

* Renamed ProxyUtils -> Proxy and aliased it back to ProxyUtils.
2018-07-30 22:06:22 -04:00