summaryrefslogtreecommitdiff
path: root/classes/urlhelper.php
AgeCommit message (Collapse)Author
2023-10-25move to psr-4 autoloaderAndrew Dolgov
2023-10-20stop calling spans scopesAndrew Dolgov
2023-10-20jaeger-client -> opentelemetryAndrew Dolgov
2023-04-09add tracing to UrlHelperAndrew Dolgov
2022-08-15Merge remote-tracking branch 'origin/master' into feature/php-7.4-stuffwn_
2022-08-15amend logic flow to fix phpstan warning in previousAndrew Dolgov
2022-08-14Handle 'file_get_contents()' failure in 'UrlHelper::fetch()'.wn_
2022-08-14Handle valid HTTP responses with no response body.wn_
2022-08-12Remove a PHP < 7.1 branch in UrlHelper.wn_
2022-08-12Switch to direct type declarations of class properties.wn_
2022-05-23use CURLAUTH_BASIC by default for password-protected feeds, keepingAndrew Dolgov
CURLAUTH_ANY as a fallback in case we got a 403.
2022-05-22Fix typoSiemenskun
2022-05-22Fix xml parsing errorSiemenskun
Move re-requesting logic before parsing response body, otherwise it puts HTTP headers into XML body
2022-03-22rewrite_relative: deal with undefined path warningAndrew Dolgov
2022-03-22rewrite_relative: use isset() to check for relative pathAndrew Dolgov
2022-03-22tests: add stub autoloader, add a few more rewrite_relative testsAndrew Dolgov
2022-03-22 * add phpunit as a dev dependencyAndrew Dolgov
* add some basic tests for UrlHelper::rewrite_relative() * fix UrlHelper::rewrite_relative() to work better on non-absolute relative URL paths
2022-02-18rewrite_relative: prevent php warning when checking for unset content type ↵Andrew Dolgov
in EXTRA_SCHEMES_BY_CONTENT_TYPE
2022-02-17rewrite_relative: whitelist specific schemes for URLs with 'known' ↵Andrew Dolgov
content-types i.e. specified for enclosures
2021-12-23fetch: return HTTP code when no curl_error() is availableAndrew Dolgov
2021-11-24urlhelper: add debugging output for download attemptsAndrew Dolgov
2021-11-20 * sql_bool_to_bool: make parameter nullableAndrew Dolgov
* errorhandler: don't try to truncate null strings * UrlHelper::rewrite_relative: fix undefined offset warnings for URLs that lack schema/host (data: etc)
2021-11-15Fix a PHPStan warning in 'UrlHelper::rewrite_relative()'.wn_
2021-11-14adjust some return types in urlhelperAndrew Dolgov
2021-11-12Switch class properties from PHP typing to PHPDoc for compatibility with PHP ↵wn_
< 7.4.0
2021-11-11Address PHPStan warnings in 'classes/diskcache.php'.wn_
2021-11-11Fix some additional PHPStan warnings in UrlHelper.wn_
2021-11-10Initial go at PHPStan rule level 6.wn_
2021-11-01Address PHPStan warnings in 'classes/urlhelper.php'.wn_
Intentionally skipping the line 66 one for now; adding an 'is_array' check clears the warning, but there's a larger topic of how to handle an invalid '' that doesn't result in an array. ------ --------------------------------------------------------------------- Line classes/urlhelper.php ------ --------------------------------------------------------------------- 66 Offset 'path' on array{scheme: string} in isset() does not exist. 165 Parameter #2 $associative of function get_headers expects bool, int given. 167 Parameter #2 $associative of function get_headers expects bool, int given. 278 Negated boolean expression is always true. 309 Negated boolean expression is always true. ------ ---------------------------------------------------------------------
2021-08-23remove SELF_USER_AGENT custom constant, replaced with configurable ↵Andrew Dolgov
Config::HTTP_USER_AGENT / Config::get_user_agent()
2021-06-18Fix operator precedencePhilip Klempin
2021-06-18revise previous a little bit moreAndrew Dolgov
2021-06-18revise previous a little bitAndrew Dolgov
2021-06-18UrlHelper::rewrite_relative():Andrew Dolgov
- support invoking specifying owner URL element/attribute - restrict mailto/magnet/tel schemes for A href - allow some data: base64 image types for IMG src Sanitizer::sanitize(): - when checking href and src attributes, pass element tagname and attribute to rewrite_relative()
2021-06-16Skip URI base on ALLOWED_RELATIVE_SCHEMES in rewrite_relativePhilip Klempin
2021-05-21UrlHelper::rewrite_relative: don't try to feed NULL to with_trailing_slash()Andrew Dolgov
2021-05-21feeditem_atom: support xml:base for enclosures and entry contentAndrew Dolgov
UrlHelper::rewrite_relative: use base URL path if relative url path is not absolute (experimental)
2021-05-07add urlhelper to extract youtube video id from urlAndrew Dolgov
2021-03-13 * limit progressfunction debugging to size quota exceeded notificationsAndrew Dolgov
* af_redditimgur: reparent generated iframes outside of post table
2021-03-06Fix "array offset on value of type null" for $error and $old_errorltGuillaume
I tried applying to only $error and only $old_error, but both appear to be needed. Log entries: E_NOTICE (8) classes/urlhelper.php:464 Trying to access array offset on value of type null 1. classes/urlhelper.php(464): ttrss_error_handler(8, Trying to access array offset on value of type null, classes/urlhelper.php, 464, [) 2. classes/rssutils.php(464): fetch([{"url":"https://some.url.rss","login":"","pass":"","timeout":15,"last_modified":"Sat, 31 Aug 2019 15:22:31 GMT"}) 3. update.php(235): update_rss_feed(732, 1)
2021-03-01move version-related stuff to Config; fix conditional feed requestsAndrew Dolgov
2021-02-28move all $fetch globals to UrlHelperAndrew Dolgov
2021-02-23cleanup some defined-stuffAndrew Dolgov
2021-02-22migrate the rest into Config::Andrew Dolgov
2021-02-06fix several warnings reported by phpstanAndrew Dolgov
2021-02-05initial WIP for php8; bump php version requirement to 7.0Andrew Dolgov
2020-12-12Handle potential absence of a URL path in UrlHelper.wn
2020-11-14URLHelper: fix E_DEPRECATED error related to idn_to_ascii()Andrew Dolgov
2020-09-28validate url: feed urlencoded() URL to filter_var() onlyAndrew Dolgov
2020-09-22another hack for validation of URLs with invalid charactersAndrew Dolgov