summaryrefslogtreecommitdiff
path: root/classes/urlhelper.php
AgeCommit message (Collapse)Author
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
2020-09-22validate URLs: convert IDN to punycode before passing URL to filter_var()Andrew Dolgov
2020-09-22use self:: in some places to invoke static methods from the same classAndrew Dolgov
2020-09-22- don't fail on non-ascii characters when validating URLsAndrew Dolgov
- fix IDN hostnames not being converted properly
2020-09-22fix previous re: resolve_redirectsAndrew Dolgov
2020-09-22remove a lot of stuff from global context (functions.php), add a few helper ↵Andrew Dolgov
classes instead