Skip to content

Commit

Permalink
Merge pull request FreshRSS#2298 from FreshRSS/dev
Browse files Browse the repository at this point in the history
FreshRSS 1.14.0
  • Loading branch information
Alkarex authored Mar 31, 2019
2 parents 8dcdde6 + 2a93551 commit d413f67
Show file tree
Hide file tree
Showing 216 changed files with 11,697 additions and 1,803 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ constants.local.php
*.save
*.autosav
*.autosave
*.sass-cache
sass.sh
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ php:
- '7.0'
- '7.1'
- '7.2'
- hhvm

install:
# newest version without https://github.com/squizlabs/PHP_CodeSniffer/pull/1404
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# FreshRSS changelog

## 2019-03-31 FreshRSS 1.14.0

* Features
* *Filter actions* feature, to auto-mark-as-read based on a search query per feed [#2275](https://github.com/FreshRSS/FreshRSS/pull/2275)
* Improve account change when using the *unsafe automatic login* [#2288](https://github.com/FreshRSS/FreshRSS/issues/2288)
* UI
* New themes *Ansum* and *Mapco* [#2245](https://github.com/FreshRSS/FreshRSS/pull/2245)
* Rewrite jQuery and keyboard shortcut code as native JavaScript ES6 (except for graphs on the statistics pages) [#2234](https://github.com/FreshRSS/FreshRSS/pull/2234)
* Batch scroll-as-read for better client-side and server-side performance [#2199](https://github.com/FreshRSS/FreshRSS/pull/2199)
* Keyboard-shortcut navigation at end of feed or category continues to the next one [#2255](https://github.com/FreshRSS/FreshRSS/pull/2255)
* Changed jump behaviour after marking articles as read [#2206](https://github.com/FreshRSS/FreshRSS/issues/2206)
* More reactive auto-loading of articles [#2268](https://github.com/FreshRSS/FreshRSS/pull/2268)
* Deployment
* New default Docker image based on Ubuntu (~3 times faster, but ~2.5 times larger) [#2205](https://github.com/FreshRSS/FreshRSS/pull/2205)
* Using Ubuntu 18.10 with PHP 7.2.15 and Apache 2.4.34
* Alpine version updated to Alpine 3.9 with PHP 7.2.14 and Apache 2.4.38 [#2238](https://github.com/FreshRSS/FreshRSS/pull/2238)
* Bug fixing
* Fix feed option for marking modified articles as unread [#2200](https://github.com/FreshRSS/FreshRSS/issues/2200)
* Fix API HTTP Authorization case-sensitivity issue introduced in FreshRSS 1.13.1 [#2233](https://github.com/FreshRSS/FreshRSS/issues/2233)
* Fix breaking warning in Fever API [#2239](https://github.com/FreshRSS/FreshRSS/issues/2239)
* Fix encoding problem in Fever API [#2241](https://github.com/FreshRSS/FreshRSS/issues/2241)
* Fix author semi-colon prefix in Fever API [#2281](https://github.com/FreshRSS/FreshRSS/issues/2281)
* Fix the reading of the environment variable `COPY_SYSLOG_TO_STDERR` [#2260](https://github.com/FreshRSS/FreshRSS/pull/2260)
* Session fix when form login + HTTP auth are used [#2286](https://github.com/FreshRSS/FreshRSS/pull/2286)
* Fix `cli/user-info.php` for accounts using a version of the database older than 1.12.0 [#2291](https://github.com/FreshRSS/FreshRSS/issues/2291)
* CLI
* Better validation of parameters [#2046](https://github.com/FreshRSS/FreshRSS/issues/2046)
* New option `--header` to `cli/user-info.php` [#2296](https://github.com/FreshRSS/FreshRSS/pull/2296)
* API
* Supported by [Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably) (client for Android using Fever API)
* I18n
* Improved Korean [#2242](https://github.com/FreshRSS/FreshRSS/pull/2242)
* Improve Occitan [#2253](https://github.com/FreshRSS/FreshRSS/pull/2253)
* Security
* Reworked the CSRF token interaction with the session in some edge cases [#2290](https://github.com/FreshRSS/FreshRSS/pull/2290)
* Remove deprecated CSP `child-src` instruction (was already replaced by `frame-src`) [#2250](https://github.com/FreshRSS/FreshRSS/pull/2250)
* Ensure entry IDs are unique and cannot be set by feeds [#2273](https://github.com/FreshRSS/FreshRSS/issues/2273)
* Misc.
* Remove HHMV from Travis continuous integration [#2249](https://github.com/FreshRSS/FreshRSS/pull/2249)


## 2019-01-26 FreshRSS 1.13.1

* Features
Expand Down
2 changes: 2 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ People are sorted by name so please keep this order.
* [Amaury Carrade](https://github.com/AmauryCarrade): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=AmauryCarrade), [Web](https://amaury.carrade.eu/)
* [Anton Smirnov](https://github.com/sandfoxme): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:sandfoxme), [Web](http://sandfox.me/)
* [ASMfreaK](https://github.com/ASMfreaK): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=ASMfreaK)
* [Benjamin Bouvier](https://github.com/bnjbvr): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:bnjbvr), [Web](https://benj.me/)
* [chemical1979](https://github.com/chemical1979): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=chemical1979)
* [Craig Andrews](https://github.com/candrews): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:candrews), [Web](http://candrews.integralblue.com/)
* [Crupuk](https://github.com/Crupuk): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Crupuk)
Expand Down Expand Up @@ -64,6 +65,7 @@ People are sorted by name so please keep this order.
* [Thomas Citharel](https://github.com/tcitworld): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:tomgue), [Web](https://www.tcit.fr/)
* [thomas-gt](https://github.com/thomas-gt): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:thomas-gt)
* [tomgue](https://github.com/tomgue): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=tomgue)
* [Thomas Guesnon](https://github.com/patjennings): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:patjennings), [Web](http://www.thomasguesnon.fr/)
* [Twilek-de](https://github.com/Twilek-de): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Twilek-de)
* [Uncovery](https://github.com/uncovery): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:uncovery)
* [Wanabo](https://github.com/Wanabo): [contributions](https://github.com/FreshRSS/FreshRSS/commits?author=Wanabo)
44 changes: 24 additions & 20 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
FROM alpine:3.8
FROM ubuntu:18.10

ENV TZ UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apk add --no-cache \
apache2 php7-apache2 \
php7 php7-curl php7-gmp php7-intl php7-mbstring php7-xml php7-zip \
php7-ctype php7-dom php7-fileinfo php7-iconv php7-json php7-session php7-simplexml php7-xmlreader php7-zlib \
php7-pdo_sqlite php7-pdo_mysql php7-pdo_pgsql
RUN apt update && \
apt install --no-install-recommends -y \
ca-certificates cron \
apache2 libapache2-mod-php \
php-curl php-intl php-mbstring php-xml php-zip \
php-sqlite3 php-mysql php-pgsql && \
rm -rf /var/lib/apt/lists/

RUN mkdir -p /var/www/FreshRSS /run/apache2/
RUN mkdir -p /var/www/FreshRSS /run/apache2/ /run/php/
WORKDIR /var/www/FreshRSS

COPY . /var/www/FreshRSS
COPY ./Docker/*.Apache.conf /etc/apache2/conf.d/

RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
/etc/apache2/conf.d/status.conf /etc/apache2/conf.d/userdir.conf && \
sed -r -i "/^\s*LoadModule .*mod_(alias|autoindex|negotiation|status).so$/s/^/#/" \
/etc/apache2/httpd.conf && \
sed -r -i "/^\s*#\s*LoadModule .*mod_(deflate|expires|headers|mime|setenvif).so$/s/^\s*#//" \
/etc/apache2/httpd.conf && \
sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
/etc/apache2/httpd.conf && \
echo "17,37 * * * * su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \
COPY ./Docker/*.Apache.conf /etc/apache2/sites-available/

RUN a2dismod -f alias autoindex negotiation status && \
a2enmod deflate expires headers mime setenvif && \
a2disconf '*' && \
a2dissite '*' && \
a2ensite 'FreshRSS*'

RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \
sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \
echo "17,37 su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \
/var/spool/cron/crontabs/root

ENV COPY_SYSLOG_TO_STDERR On
ENV CRON_MIN ''
ENTRYPOINT ["./Docker/entrypoint.sh"]

EXPOSE 80
CMD ([ -z "$CRON_MIN" ] || crond -d 6) && \
exec httpd -D FOREGROUND
CMD ([ -z "$CRON_MIN" ] || cron) && \
. /etc/apache2/envvars && \
exec apache2 -D FOREGROUND
34 changes: 34 additions & 0 deletions Docker/Dockerfile-Alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM alpine:3.9

ENV TZ UTC

RUN apk add --no-cache \
apache2 php7-apache2 \
php7 php7-curl php7-gmp php7-intl php7-mbstring php7-xml php7-zip \
php7-ctype php7-dom php7-fileinfo php7-iconv php7-json php7-session php7-simplexml php7-xmlreader php7-zlib \
php7-pdo_sqlite php7-pdo_mysql php7-pdo_pgsql

RUN mkdir -p /var/www/FreshRSS /run/apache2/
WORKDIR /var/www/FreshRSS

COPY . /var/www/FreshRSS
COPY ./Docker/*.Apache.conf /etc/apache2/conf.d/

RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
/etc/apache2/conf.d/status.conf /etc/apache2/conf.d/userdir.conf && \
sed -r -i "/^\s*LoadModule .*mod_(alias|autoindex|negotiation|status).so$/s/^/#/" \
/etc/apache2/httpd.conf && \
sed -r -i "/^\s*#\s*LoadModule .*mod_(deflate|expires|headers|mime|setenvif).so$/s/^\s*#//" \
/etc/apache2/httpd.conf && \
sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
/etc/apache2/httpd.conf && \
echo "17,37 * * * * su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \
/var/spool/cron/crontabs/root

ENV COPY_SYSLOG_TO_STDERR On
ENV CRON_MIN ''
ENTRYPOINT ["./Docker/entrypoint.sh"]

EXPOSE 80
CMD ([ -z "$CRON_MIN" ] || crond -d 6) && \
exec httpd -D FOREGROUND
1 change: 1 addition & 0 deletions Docker/FreshRSS.Apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DocumentRoot /var/www/FreshRSS/p/
CustomLog /dev/stdout combined
ErrorLog /dev/stderr
AllowEncodedSlashes On
ServerTokens OS

<Directory />
AllowOverride None
Expand Down
68 changes: 44 additions & 24 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,6 @@ sh get-docker.sh
```


## Optional: Build Docker image of FreshRSS
Optional, as a *less recent* online image can be automatically fetched during the next step (run),
but online images are not available for as many platforms (e.g. Raspberry Pi / ARM) as if you build yourself.

```sh
# First time only
git clone https://github.com/FreshRSS/FreshRSS.git

cd ./FreshRSS/
git pull
sudo docker pull alpine:3.8
sudo docker build --tag freshrss/freshrss -f Docker/Dockerfile .
```


## Create an isolated network
```sh
sudo docker network create freshrss-network
Expand All @@ -36,10 +21,12 @@ Here is the recommended configuration using automatic [Let’s Encrypt](https://

```sh
sudo docker volume create traefik-letsencrypt
sudo docker volume create traefik-tmp

# Just change your e-mail address in the command below:
sudo docker run -d --restart unless-stopped --log-opt max-size=10m \
-v traefik-letsencrypt:/etc/traefik/acme \
-v traefik-tmp:/tmp \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--net freshrss-network \
-p 80:80 \
Expand All @@ -59,6 +46,8 @@ See [more information about Docker and Let’s Encrypt in Træfik](https://docs.
Example using the built-in refresh cron job (see further below for alternatives).
You must first chose a domain (DNS) or sub-domain, e.g. `freshrss.example.net`.

> **N.B.:** For platforms other than x64 (Intel, AMD), such as ARM (e.g. Raspberry Pi), see the section *Build Docker image* further below.
```sh
sudo docker volume create freshrss-data

Expand Down Expand Up @@ -121,15 +110,6 @@ Browse to your server https://freshrss.example.net/ to complete the installation
or use the command line described below.


## Command line

```sh
sudo docker exec --user apache -it freshrss php ./cli/list-users.php
```

See the [CLI documentation](../cli/) for all the other commands.


## How to update

```sh
Expand All @@ -145,6 +125,42 @@ sudo docker rm freshrss_old
```


## [Docker tags](https://hub.docker.com/r/freshrss/freshrss/tags)
The tags correspond to FreshRSS branches and versions:
* `:latest` (default) is the `master` branch, more stable
* `:dev` is the `dev` branch, rolling release
* `:x.y.z` are specific FreshRSS releases

### Linux: Ubuntu vs. Alpine
Our default image is based on [Ubuntu](https://www.ubuntu.com/server). We offer an alternative based on [Alpine](https://alpinelinux.org/) (with the `-alpine` tag suffix).
In [our tests](https://github.com/FreshRSS/FreshRSS/pull/2205), Ubuntu is ~3 times faster,
while Alpine is ~2.5 times [smaller on disk](https://hub.docker.com/r/freshrss/freshrss/tags) (and much faster to build).


## Optional: Build Docker image of FreshRSS
Building your own Docker image is optional because online images can be fetched automatically.
Note that prebuilt images are less recent and only available for x64 (Intel, AMD) platforms.

```sh
# First time only
git clone https://github.com/FreshRSS/FreshRSS.git

cd ./FreshRSS/
git pull
sudo docker pull ubuntu:18.10
sudo docker build --tag freshrss/freshrss -f Docker/Dockerfile .
```


## Command line

```sh
sudo docker exec --user apache -it freshrss php ./cli/list-users.php
```

See the [CLI documentation](../cli/) for all the other commands.


## Debugging

```sh
Expand Down Expand Up @@ -289,6 +305,10 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_read_timeout 90;
# Forward the Authorization header for the Google Reader API.
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
}
}
```
3 changes: 2 additions & 1 deletion README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ Voir notre [documentation sur l’API Fever](https://freshrss.github.io/FreshRSS

Tout client supportant une API de type Fever ; Sélection :

* Android
* [Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably) (Propriétaire)
* iOS
* [Fiery Feeds](https://itunes.apple.com/app/fiery-feeds-rss-reader/id1158763303) (Propriétaire)
* [Unread](https://itunes.apple.com/app/unread-rss-reader/id1252376153) (Propriétaire)
Expand All @@ -210,7 +212,6 @@ Tout client supportant une API de type Fever ; Sélection :
* [php-http-304](https://alexandre.alapetite.fr/doc-alex/php-http-304/)
* [jQuery](https://jquery.com/)
* [lib_opml](https://github.com/marienfressinaud/lib_opml)
* [keyboard_shortcuts](http://www.openjs.com/scripts/events/keyboard_shortcuts/)
* [flotr2](http://www.humblesoftware.com/flotr2)

## Uniquement pour certaines options ou configurations
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ See our [Fever API documentation](https://freshrss.github.io/FreshRSS/en/users/0

Supported clients are:

* Android
* [Readably](https://play.google.com/store/apps/details?id=com.isaiasmatewos.readably) (Closed source)
* iOS
* [Fiery Feeds](https://itunes.apple.com/app/fiery-feeds-rss-reader/id1158763303) (Closed source)
* [Unread](https://itunes.apple.com/app/unread-rss-reader/id1252376153) (Closed source)
Expand All @@ -210,7 +212,6 @@ Supported clients are:
* [php-http-304](https://alexandre.alapetite.fr/doc-alex/php-http-304/)
* [jQuery](https://jquery.com/)
* [lib_opml](https://github.com/marienfressinaud/lib_opml)
* [keyboard_shortcuts](http://www.openjs.com/scripts/events/keyboard_shortcuts/)
* [flotr2](http://www.humblesoftware.com/flotr2)

## Only for some options or configurations
Expand Down
9 changes: 6 additions & 3 deletions app/Controllers/authController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function indexAction() {
* the user is already connected.
*/
public function loginAction() {
if (FreshRSS_Auth::hasAccess()) {
if (FreshRSS_Auth::hasAccess() && Minz_Request::param('u', '') == '') {
Minz_Request::forward(array('c' => 'index', 'a' => 'index'), true);
}

Expand Down Expand Up @@ -109,8 +109,7 @@ public function loginAction() {
public function formLoginAction() {
invalidateHttpCache();

$file_mtime = @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js');
Minz_View::appendScript(Minz_Url::display('/scripts/bcrypt.min.js?' . $file_mtime));
Minz_View::appendScript(Minz_Url::display('/scripts/bcrypt.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js')));

$conf = Minz_Configuration::get('system');
$limits = $conf->limits;
Expand All @@ -134,6 +133,7 @@ public function formLoginAction() {
// Set session parameter to give access to the user.
Minz_Session::_param('currentUser', $username);
Minz_Session::_param('passwordHash', $conf->passwordHash);
Minz_Session::_param('csrf');
FreshRSS_Auth::giveAccess();

// Set cookie parameter if nedded.
Expand Down Expand Up @@ -162,6 +162,8 @@ public function formLoginAction() {
return;
}

FreshRSS_FormAuth::deleteCookie();

$conf = get_user_configuration($username);
if ($conf == null) {
return;
Expand All @@ -177,6 +179,7 @@ public function formLoginAction() {
if ($ok) {
Minz_Session::_param('currentUser', $username);
Minz_Session::_param('passwordHash', $s);
Minz_Session::_param('csrf');
FreshRSS_Auth::giveAccess();

Minz_Request::good(_t('feedback.auth.login.success'),
Expand Down
13 changes: 7 additions & 6 deletions app/Controllers/entryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ public function readAction() {
}
}
} else {
$entryDAO->markRead($id, $is_read);

$ids = is_array($id) ? $id : array($id);
$entryDAO->markRead($ids, $is_read);
$tagDAO = FreshRSS_Factory::createTagDao();
foreach ($tagDAO->getTagsForEntry($id) as $tag) {
if (!empty($tag['checked'])) {
$this->view->tags[] = $tag['id'];
}
$tagsForEntries = $tagDAO->getTagsForEntries($ids);
$tags = array();
foreach ($tagsForEntries as $line) {
$tags['t_' . $line['id_tag']][] = $line['id_entry'];
}
$this->view->tags = $tags;
}

if (!$this->ajax) {
Expand Down
Loading

0 comments on commit d413f67

Please sign in to comment.