Commit Graph

26 Commits (aead30a0419975328348f545768c0470d256b30d)

Author SHA1 Message Date
Andrew Dolgov 2c931df77c remove SELF_USER_AGENT custom constant, replaced with configurable Config::HTTP_USER_AGENT / Config::get_user_agent() 3 years ago
Philip Klempin 1d4d3bc49c Fix operator precedence 3 years ago
Andrew Dolgov 800ebd6373 revise previous a little bit more 3 years ago
Andrew Dolgov 69f261c41d revise previous a little bit 3 years ago
Andrew Dolgov e9c062a189 UrlHelper::rewrite_relative():
- 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()
3 years ago
Philip Klempin b3bedd0a94 Skip URI base on ALLOWED_RELATIVE_SCHEMES in rewrite_relative 3 years ago
Andrew Dolgov 326850845d UrlHelper::rewrite_relative: don't try to feed NULL to with_trailing_slash() 4 years ago
Andrew Dolgov dff479af64 feeditem_atom: support xml:base for enclosures and entry content
UrlHelper::rewrite_relative: use base URL path if relative url path is not absolute (experimental)
4 years ago
Andrew Dolgov 86300a0ca8 add urlhelper to extract youtube video id from url 4 years ago
Andrew Dolgov 4ddcd54e8d * limit progressfunction debugging to size quota exceeded notifications
* af_redditimgur: reparent generated iframes outside of post table
4 years ago
ltGuillaume 825e362f0e Fix "array offset on value of type null" for $error and $old_error
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)
4 years ago
Andrew Dolgov 320503dd39 move version-related stuff to Config; fix conditional feed requests 4 years ago
Andrew Dolgov afc7142250 move all $fetch globals to UrlHelper 4 years ago
Andrew Dolgov 2ae0b7059f cleanup some defined-stuff 4 years ago
Andrew Dolgov 211f699aa0 migrate the rest into Config:: 4 years ago
Andrew Dolgov b6e1a5c91a fix several warnings reported by phpstan 4 years ago
Andrew Dolgov 403dca154c initial WIP for php8; bump php version requirement to 7.0 4 years ago
wn 95d0cb4953 Handle potential absence of a URL path in UrlHelper. 4 years ago
Andrew Dolgov 328d7b55c8 URLHelper: fix E_DEPRECATED error related to idn_to_ascii() 4 years ago
Andrew Dolgov c70e26db31 validate url: feed urlencoded() URL to filter_var() only 4 years ago
Andrew Dolgov 8fb2baecdc another hack for validation of URLs with invalid characters 4 years ago
Andrew Dolgov a897c4165b validate URLs: convert IDN to punycode before passing URL to filter_var() 4 years ago
Andrew Dolgov 6811d0bde2 use self:: in some places to invoke static methods from the same class 4 years ago
Andrew Dolgov b5710baf34 - don't fail on non-ascii characters when validating URLs
- fix IDN hostnames not being converted properly
4 years ago
Andrew Dolgov ab6aa0ad3e fix previous re: resolve_redirects 4 years ago
Andrew Dolgov 74568df4ff remove a lot of stuff from global context (functions.php), add a few helper classes instead 4 years ago