Commit Graph

701 Commits

Author SHA1 Message Date
Alexandre Alapetite
ec5f7ad554 Workaround for Firefox favicon glitch (#2543)
Observed in Firefox 69: the favicon is sometimes refreshed with an old
favicon that does not have the number of unread items on it. Seems to
depend on load speed.
2019-10-01 18:12:48 +02:00
Alexandre Alapetite
ef00513a81 Quick fix: API PDO visibility bug (#2545)
Introduced in https://github.com/FreshRSS/FreshRSS/pull/2522
2019-09-29 17:55:08 +02:00
Alexandre Alapetite
e3e5954394 PDO refactoring for code simplification (#2522)
* 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-09-29 16:22:50 +02:00
rocka
1f3672fcc1 Optimize dynamic favicon for HiDPI screens (#2539)
This PR leveraging `window.devicePixelRatio` to generate high resolution favicons for HiDPI screens.
2019-09-28 12:10:51 +02:00
Alexandre Alapetite
28ab89146b API Reeder compatibility (#2526)
https://github.com/FreshRSS/FreshRSS/issues/2513
2019-09-18 13:03:53 +02:00
Marien Fressinaud
18efce3543 tec: Ignore theme folders starting by xTheme- (#2511) 2019-08-29 17:31:49 +02:00
Alexandre Alapetite
125a83efc9 IE11 / Edge keyboard compatibility (#2507)
https://github.com/FreshRSS/FreshRSS/pull/2506#issuecomment-523544684
2019-08-22 20:13:40 +02:00
ArthurHoaro
3f8804f54f Prevent window opener vulnerability with space shortcut (#2506)
* Prevent window opener vulnerability with space shortcut

This change fixes a vulnerability introduced by `window.open()` on untrusted sources. It reproduces the effect of `rel="noreferrer"` with JS.

Cross browser solution from: https://stackoverflow.com/a/40593743

## Reproduction

> tested with Firefox 68

  1. Add this RSS feed
  2. Open the 2nd link "À propos de la faille de sécurité liée à target="_blank" **using the space key shortcut**.
  3. Click on the first of three links "http://bookmarks.ecyseo.net"

Current behaviour: the FreshRSS tab changes.
Expected behaviour: no effect on FreshRSS

* Test for popup blockers
2019-08-21 21:14:22 +02:00
Alexandre Alapetite
fd33d92d41 Require PHP 5.5+ (#2495)
* Require PHP 5.5+

https://github.com/FreshRSS/FreshRSS/issues/2469#issuecomment-522255093
I think it would be reasonable to require PHP 5.5+ for the core of
FreshRSS after all.

As Frenzie said, WordPress currently requires PHP 5.6.20+, and it is the
most popular PHP application.

We would loose about 20% of the PHP servers according to
https://w3techs.com/technologies/details/pl-php/5/all but I expect this
number to drop fast after the release of CentOS 8 (CentOS accounts for
17% of Linux servers
https://w3techs.com/technologies/details/os-linux/all/all ).

Distributions:
* no impact on Ubuntu, Fedora, Alpine, OpenWRT, FreeBSD, OpenSuze,
Mageia, as all active versions have PHP > 7
* no impact on OpenSuze, Synology, as all active versions have PHP > 5.5
* we drop Debian 8 Jessie (-2020) - we keep supporting Debian 9 Stretch
(2017-06) - current is Debian 10 Buster
* we drop Red Hat 7 (-2024) - we keep supporting RHEL 8 (2019-05)
* we drop CentOS 7 (-2024) - we will support CentOS 8 (to be released
soonish)

When dropping older versions, I can better like when it is for a good
reason, and there is actually one with PHP 5.5, namely generators
(yield) https://php.net/language.generators.overview which I consider
using.

* Version note for JSON.php

* hex2bin

* Update .travis.yml

Co-Authored-By: Frans de Jonge <fransdejonge@gmail.com>
2019-08-20 14:55:43 +02:00
Frans de Jonge
20c38d7083 [CI] Run stylelint (#2477)
* [CI] Run stylelint

Perform some basic CSS sanity checking and style enforcement.

I removed vendor prefixed linear-gradient and transform because those are from the IE9 era. With IE11 as a minimum and soon obsolete requirement it doesn't make much sense anymore.

* Remove as-link override

* Don't require newline after comment

* Also apply those newline rules to SCSS

* refine opening/closing braces, allow for single-line
2019-08-14 22:29:28 +02:00
Joris Kinable
cb31874085 Added option to display authors under article titles (#2487)
This feature is particularly useful to display authors underneath scientific articles.
2019-08-14 15:16:06 +02:00
Marien Fressinaud
7533676ae7 Add support for images to the ext.php endpoint (#2465) 2019-07-31 13:49:29 +02:00
Frans de Jonge
ad92518fe4 [CI] Run shellcheck and shfmt (#2454)
* [CI] Run shellcheck and shfmt

Cf. https://github.com/FreshRSS/FreshRSS/pull/2436#discussion_r305640019

* rename

* no need for disable anymore

* also remove leftover indentation flags even if it makes no difference to syntax checking

* define colors and reset before exit for local use
2019-07-22 16:07:40 +02:00
Nick Cross
1aa2af9752 Issue #2446 : Fix passing authentication headers (#2449)
* Issue #2446 : Fix passing authentication headers. Use CGIPassAuth is version is high enough

* Issue #2446 : Remove CGIPassAuth due to potential issues with AllowOverride rights.

* Tabs
2019-07-20 23:23:24 +02:00
Uncovery
25eada5bda Change to fix issues 2251 (#2301)
* Change to fix issues 2251

This is a proposed change to fix issue https://github.com/FreshRSS/FreshRSS/issues/2251

* Remove comments
2019-07-13 21:06:18 +02:00
Rosemary Le Faive
366ac2c57f Don't ignore br tags. (#2439) 2019-07-08 10:10:55 +02:00
Alexandre Alapetite
879312dbc2 jQuery 3.4.1 (#2424)
Only used for statistics graphs
2019-06-22 00:08:52 +02:00
Alexis Degrugillier
2decc82c3e Change category configuration (#2410)
* Change category configuration

Before, we had a drop-down list to interract on categories. It was not
working the same way as feeds.
Now, categories and feeds behave in a similar manner. At the moment,
there is no change in features but it will allow to expand them.

See #2369

* Minor whitespace
2019-06-21 08:42:06 +02:00
Patrick
6cc73d03c3 Make Aside sit on top of New Articles Popup (#2416)
Fixes #2379.
2019-06-21 08:06:22 +02:00
Alexandre Alapetite
037c385947 Fix API remove category (#2412)
Fix https://github.com/FreshRSS/FreshRSS/issues/2411
2019-06-16 18:59:50 +02:00
Alexandre Alapetite
2882752117 Merge pull request #2374 from aledeg/feature/print-css
Add theme to print page
2019-05-30 12:38:19 +02:00
Alexis Degrugillier
d5ea3e96ef Add theme to print page
Before, the printed page didn't have any usable CSS.
Now, it uses the css files available in the application. It means that
custom CSS can be add to target printed page.

See #2149
2019-04-16 18:50:32 +02:00
Alexandre Alapetite
c09b6c74b3 Forgotten colour 2019-04-16 12:05:07 +02:00
Alexandre Alapetite
a44f65892b More minimal patch 2019-04-16 12:04:22 +02:00
Alexandre Alapetite
ee9edae477 Fix Sage theme SVG refresh
https://github.com/FreshRSS/FreshRSS/issues/2375
2019-04-16 11:29:43 +02:00
Alexandre Alapetite
d26a49bc66 Fix API minor code syntax warning (#2362)
https://github.com/FreshRSS/FreshRSS/issues/2359#issuecomment-480620713
2019-04-07 21:50:26 +02:00
Alexandre Alapetite
aef3f8d71b Alow mix of auto read options (#2354)
Fix
https://github.com/FreshRSS/FreshRSS/pull/2349#issuecomment-480540126
2019-04-07 00:29:37 +02:00
Alexandre Alapetite
1b7cf6b035 Fix menu warning (#2353)
confirm is only for labels, not for feeds
2019-04-06 17:05:53 +02:00
Alexandre Alapetite
43e3a2d69d Fix autoremove again (#2352)
Fix https://github.com/FreshRSS/FreshRSS/pull/2349
2019-04-06 16:45:21 +02:00
Alexandre Alapetite
0a067dbcd4 Fix hide articles + batch option (#2349)
https://github.com/FreshRSS/FreshRSS/issues/2332
https://github.com/FreshRSS/FreshRSS/issues/2345
Re-introduces the instant-remove article.
Batch mark-as-read only used for fast actions like scroll and keyboard
shortcut for next/previous articles.
2019-04-06 15:51:39 +02:00
Alexandre Alapetite
74f92658b7 Fix for extensions on Windows (#2348)
https://github.com/FreshRSS/FreshRSS/issues/994
https://github.com/FreshRSS/FreshRSS/issues/2287
2019-04-06 14:07:19 +02:00
Alexandre Alapetite
09a5b4493d Better handling of bad request and fast unload (#2346)
* Better handling of bad request and fast unload

Warnings for bad requests, confirmation before leaving a page with
pending mark-as-read requests (not the others for now)

* Fix callbacks
2019-04-06 09:24:22 +02:00
Alexandre Alapetite
e1bb23ee44 Fix scroll functions in Edge (#2337)
Use more standard / robust document.scrollingElement
2019-04-04 00:02:23 +02:00
Alexandre Alapetite
2efab9893c Fix shortcut problem when showing articles unfolded (#2336)
Fix https://github.com/FreshRSS/FreshRSS/issues/2328
2019-04-03 23:10:33 +02:00
Alexandre Alapetite
452419bf83 Fix auto_remove_article (#2334)
* Fix auto_remove_article

https://github.com/FreshRSS/FreshRSS/issues/2323

* Second attempt

* Third attempt
2019-04-03 23:08:46 +02:00
Alexandre Alapetite
8599dc29a1 Fix control click (#2330)
https://github.com/FreshRSS/FreshRSS/issues/2310
2019-04-02 22:46:56 +02:00
Frans de Jonge
c2a339f2f8 [CI] Lint JS scripts with jshint (#2315) 2019-04-01 23:47:36 +02:00
Alexandre Alapetite
e5c8d52aa1 Fix ASC load more (#2318)
https://github.com/FreshRSS/FreshRSS/issues/2314
2019-04-01 23:43:20 +02:00
Alexandre Alapetite
09362f15ee Minor code simplification
https://github.com/FreshRSS/FreshRSS/pull/2300
2019-03-27 00:08:59 +01:00
Alexandre Alapetite
580123fdb0 Wait for mark-as-read queue before click (#2300) 2019-03-25 08:46:31 +01:00
Alexandre Alapetite
ebd8c31c02 Rework CSRF interaction with sessions (#2290)
* Rework CSRF interaction with sessions

Fix https://github.com/FreshRSS/FreshRSS/issues/2288
Improve security in some edge cases
Maybe relevant for
https://github.com/FreshRSS/FreshRSS/issues/2125#issuecomment-474992671

* Forgotten mime type
2019-03-22 19:05:38 +01:00
Alexandre Alapetite
cb00eafba0 Fever remove semicolomn from author (#2283)
https://github.com/FreshRSS/FreshRSS/issues/2281
2019-03-19 20:08:56 +01:00
Alexandre Alapetite
54a86990e6 Improved auto load more articles
Fixed bug + ealier trigger of load more (half of the window height
instead of 0)
2019-03-09 19:15:46 +01:00
Alexandre Alapetite
5b8c3e5bf3 Fix base theme border regression
https://github.com/FreshRSS/FreshRSS/issues/2254
2019-03-09 18:25:33 +01:00
Alexandre Alapetite
b869c2944a JavaScript fixes + new navigation loop behaviour (#2255)
* Fixed user configuration 404
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466561555
* Fixed "SPACE" shortcut bug
https://github.com/FreshRSS/FreshRSS/pull/2234#issuecomment-466626412
* Use next feed / previous feed when reaching last / first article
instead of looping
* Jump to next / previous category when reaching last / first feed
instead of looping
2019-02-23 14:39:20 +01:00
Alexandre Alapetite
2374374ba9 Less jQuery (#2234)
* Less jQuery

Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2199

* Even less jQuery + global view unread title fix

* Even less jQuery

* Yet even less jQuery

* Even less jQuery

* Reduce some events

* Even less jQuery

* jQuery gone from main view

+Fixed English i18n

* Fix feed folded view

* Remove Firefox 64 workaround

Remove workaround for Gecko bug 1514498 in Firefox 64, fixed in Firefox
65

* Split to extra.js

Avoid loading unneeded JavaScript code for the main view.
+ several adjustements

* Improve CSS transition fold category

* Rewrite shortcuts

Remove library. Much faster, shorter, one listener instead of many.
Control of the shortcut context.
Fix https://github.com/FreshRSS/FreshRSS/issues/2215

* Remove debug

* Minor syntax

* Filter out unwanted shortcut modifiers

* Menu overflow fix

* Typo

* Fix unfolding in mobile view

* Remove jQuery from category.js

* Remove jQuery from Global view
2019-02-13 15:06:28 +01:00
Thomas Guesnon
086fa0d49a Two themes (#2245)
* Two new themes

* update gitignore

* dirs cleaning + mobile ui improvements

* name added to credits file

* New line
2019-02-13 11:37:37 +01:00
Alexandre Alapetite
69eb651d56 Minor Unicode changes 2019-02-05 09:36:39 +01:00
Alexandre Alapetite
ce62ce0ebd Fever API encoding of special chars
https://github.com/FreshRSS/FreshRSS/issues/2241
2019-02-05 09:30:18 +01:00
Alexandre Alapetite
65602ab193 Case insensitive Authorization
https://github.com/FreshRSS/FreshRSS/issues/2233
2019-01-31 23:00:29 +01:00