aboutsummaryrefslogtreecommitdiff
path: root/lib/favicons.php
AgeCommit message (Collapse)Author
2023-12-18Pass PHPStan level 8 (#5946)Gravatar Alexandre Alapetite
* Pass PHPStan level 8 And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels * Revert wrong replace in comment * Fix PHPStan level 8 * Update PHPStan and other dev dependencies * Remove obsolete comment * noVariableVariables and towards bleedingEdge https://github.com/phpstan/phpstan-strict-rules https://phpstan.org/blog/what-is-bleeding-edge * More bleedingEdge * A bit more PHPStan level 9 * More PHPStan level 9 * Prepare for booleansInConditions Ignore int and null * Revert wrong line * More fixes * Fix keep_max_n_unread * Stricter attribute functions * Stricter callHooks and more PHPStan level 9 * More typing * A tiny more
2023-11-16Use strict_types (#5830)Gravatar Luc SANCHEZ
* Little's optimisations and booleans in conditions * Apply strict type * Apply strict type * Apply strict type * Fix multiple bugs with PHP 8.2 and 8.3 * Many declares missing, more errors fixed * Apply strict type * Another approach * Stronger typing for Minz_Session * Fix case of SQLite --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-11-14Favicon: avoid echo exception (#5867)Gravatar Alexandre Alapetite
Avoid potential Information Exposure
2023-11-10Rework the behavior of favicon search (#5839)Gravatar Dan Hersam
* Rework the behavior of favicon search Use xpath queries to reduce the filtering necessary. Don't call checkUrl since the href value will not always be a full URL. Check for a base path in the HTML to be used if the favicon href doesn't start with a leading slash. * Break long xpath query into two lines * Fix issues found by CI
2023-07-07fix many "Only booleans are allowed in an if condition" (#5501)Gravatar Luc SANCHEZ
* fix many "Only booleans are allowed in an if condition" * Update cli/create-user.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update cli/i18n/I18nUsageValidator.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Fix several regressions and other minor things * Fix another regression * Update lib/http-conditional.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-25Fix favicon fetching while using proxies (#5421)Gravatar vrachnis
* Fix favicon fetching while using proxies This ensures that if curl_options are defined in config.php, those settings are respected while fetching favicons. Fixes FreshRSS#4951 * Change options priority * Credits keep alphabticorder --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-04-05Fix phpstan level 9 error for f.php and lib/favicons.php (#5263)Gravatar Luc SANCHEZ
* Fix phpstan level 9 error * Fix phpstan level 9 error * Remarque's from Alkarex --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
2023-03-31PHPStan level 6 for all PDO and Exception classes (#5239)Gravatar Alexandre Alapetite
* PHPStan level 6 for all PDO and Exception classes Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112 * Fix type * Now also our remaining own librairies * Motivation for a few more files * A few more DAO classes * Last interface
2020-07-31Relaxed to allow underscore _ in URL hostnames (#3133)Gravatar Alexandre Alapetite
* Relaxed to allow underscore _ in URL hostnames #fix https://github.com/FreshRSS/FreshRSS/issues/3132 https://bugs.php.net/bug.php?id=64948 * Minor fix in favicons redirect * Minor fix in relative HREF for favicons
2020-01-03Fix logging environment constants (#2745)Gravatar Alexandre Alapetite
* Fix logging environment constants * COPY_LOG_TO_SYSLOG was only working when Syslog was used * FRESHRSS_ENV was not properly used to set logging level * Simplify code Always call `openlog()` even when it is not used * Always specify syslog properties https://github.com/FreshRSS/FreshRSS/pull/2745#discussion_r362207445 * $username is also needed further down * No new line in syslog
2019-09-29PDO refactoring for code simplification (#2522)Gravatar Alexandre Alapetite
* PDO refactor * Automatic prefix when using the syntax `_tableName` * Uniformity: MySQL is now PDO::ATTR_EMULATE_PREPARES = false just like SQLite and PostgreSQL, with consequences such as only one statement per query * Use PDO methods exec(), query(), prepare() + execute() in a more efficient way * Remove auto-update SQL code for versions older than FreshRSS 1.5 (3 years old) * The name of the default category is set in PHP instead of in the DB (simplies SQL and allows changing the name according to the FreshRSS language) * Rename `->bd` to `->pdo` (less of a frenshism, and more informative) * Fix some requests, which were not compatible with MySQL prepared statements * Whitespace * Fix syntax for PostgreSQL sequences + MySQL install * Minor formatting * Fix lastInsertId for PostgreSQL * Use PHP 5.6+ const Take advantage of https://github.com/FreshRSS/FreshRSS/pull/2527 https://www.php.net/manual/en/migration56.new-features.php * A bit of forgotten PHP 5.6 simplification for cURL * Forgotten $s * Mini fix custom user config https://github.com/FreshRSS/FreshRSS/pull/2490/files#r326290346 * More work on install.php but not finished * install.php working * More cleaning of PDO in install * Even more simplification Take advantage of PDO->exec() to run multiple statements * Disallow changing the name of the default category https://github.com/FreshRSS/FreshRSS/pull/2522#discussion_r326967724
2019-01-06Copy syslog to STDERR (#2208)Gravatar Alexandre Alapetite
* Use openlog before syslog In order to have a copy on stderr when syslog is not available. * Take advantage of syslog for actualization Pipe cron job STDERR and syslog to Docker log Cf. https://github.com/FreshRSS/FreshRSS/pull/2202/commits/00bd467655b7c060cdae388519b2413d12d8cb0f
2017-12-17Remove warning for CURLOPT_FOLLOWLOCATION with open_basedir (#1734)Gravatar Alexandre Alapetite
For PHP 5.6.0- http://www.php.net/ChangeLog-5.php#5.6.0 https://bugs.php.net/bug.php?id=65646 https://github.com/FreshRSS/FreshRSS/pull/1733 https://github.com/FreshRSS/FreshRSS/pull/1657 https://github.com/FreshRSS/FreshRSS/issues/1655
2017-12-17Fix favicon for open_basedir (#1733)Gravatar Kevin Papst
Remove open_basedir warning for CURLOPT_FOLLOWLOCATION with PHP 5.6.0- https://bugs.php.net/bug.php?id=65646
2017-10-08CURLOPT_FOLLOWLOCATION open_basedir bug (#1657)Gravatar Alexandre Alapetite
CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set https://github.com/FreshRSS/FreshRSS/issues/1655#issuecomment-334999448 https://stackoverflow.com/questions/6918623/curlopt-followlocation-cannot-be-activated
2017-10-07Remove SimplePie name from HTTP User-Agent stringGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1622#issuecomment-334928486 https://github.com/FreshRSS/FreshRSS/issues/1627 https://github.com/FreshRSS/FreshRSS/issues/1607
2017-09-22[ci] Add Travis (#1619)Gravatar Frans de Jonge
* [ci] Add Travis * Exclude some libs * Semi-auto whitespace fixes * line length in SQLite * Exclude tests from line length * Feed.php line length * Feed.php: get rid of unnecessary concat * Feed.php: line length * bootstrap.php: no newline at end of file * Allow concatenating across multiple lines * Add Travis badge * do-install line length * update-or-create-user line length * cli/create-user line length * tests/app/Models/SearchTest.php fix indentation * tests/app/Models/UserQueryTest.php fix indentation * tests/app/Models/CategoryTest.php fix indentation * [fix] PHP 5.3 on precise * cli/do-install no spaces * cli/list-users line length * cli/reconfigure line length * empty catch statements * api/index line length nonsense * spaces before semicolon * app/Models/EntryDAO bunch of indentation * extra blank lines * spaces before comma in function call * testing tabwidth * increase to 10 * comment out tabwidth line * try older phpcs version 3.0.0RC4 * line length exception for app/install.php * proper spaces * stray spaces in i18n * Minz/ModelPdo line length * Minz whitespace * greader line length * greader elseif placement * app/Models/Feed.php spacing in function argument * ignore php 5.3 * app/Models/ConfigurationSetter.php stray whitespace * EntryDAOSQLite line length * I vote for higher max line length =P * ignore SQL * remove classname complaint * line length/more legible SQL * ignore line length nonsense * greader line length * feedController issues * uppercase TRUE, FALSE, NULL * revert * importExportController lowercase null * Share.php default value not necessary because ! is_array () a few lines down * CategoryDAO constants should be UPPERCASE * EntryDAO reduce line length * contentious autofix * Allow failures on all versions of PHP except 7.1 because reasons
2017-04-23Minor favicon textGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/pull/1505 https://github.com/FreshRSS/FreshRSS/pull/1504
2017-04-23Better handling of protocol-relative faviconsGravatar Alexandre Alapetite
https://github.com/ArthurHoaro/favicon/pull/6/commits/cd5f98ecdd1d38e8bc5d87fd09c80079a74191ba https://github.com/FreshRSS/FreshRSS/pull/1504
2017-04-23Favicon minorGravatar Alexandre Alapetite
2017-04-23Rewriten Favicon library using cURLGravatar Alexandre Alapetite
Reduce the number of requests, more robust, many more cases working, reduced code
2017-04-23Favicon fix redirectsGravatar Alexandre Alapetite
https://github.com/ArthurHoaro/favicon/pull/5/commits/92b42591591b4282261f21ed5ffa553f5e987a9d
2017-04-22Fix some bugs of Favicon 1.2Gravatar Alexandre Alapetite
https://github.com/ArthurHoaro/favicon/pull/6 https://github.com/ArthurHoaro/favicon/pull/7
2017-04-22Use new version 1.2 of Favicon libraryGravatar Alexandre Alapetite
2016-11-28Add curl user-agent to retrive faviconGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/1380
2016-10-12Cron refresh faviconsGravatar Alexandre Alapetite
Related to https://github.com/FreshRSS/FreshRSS/issues/1181 https://github.com/FreshRSS/FreshRSS/issues/1298