Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: miniflux/v2
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.2.4
Choose a base ref
...
head repository: miniflux/v2
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 13,364 additions and 10,162 deletions.
  1. +4 −4 .github/pull_request_template.md
  2. +3 −3 .github/workflows/build_binaries.yml
  3. +9 −3 .github/workflows/codeql-analysis.yml
  4. +6 −2 .github/workflows/debian_packages.yml
  5. +2 −0 .github/workflows/docker.yml
  6. +20 −3 .github/workflows/linters.yml
  7. +6 −2 .github/workflows/rpm_packages.yml
  8. +11 −7 .github/workflows/tests.yml
  9. +103 −0 ChangeLog
  10. +10 −0 Makefile
  11. +2 −2 client/README.md
  12. +1 −0 client/client.go
  13. +1 −1 client/request.go
  14. +23 −21 go.mod
  15. +70 −40 go.sum
  16. +1 −1 internal/api/api_integration_test.go
  17. +3 −19 internal/database/database.go
  18. +199 −144 internal/database/migrations.go
  19. +31 −0 internal/database/postgresql.go
  20. +26 −0 internal/database/sqlite.go
  21. +1 −0 internal/googlereader/handler.go
  22. +1 −1 internal/http/request/cookie.go
  23. +2 −2 internal/http/response/builder.go
  24. +60 −18 internal/http/response/json/json.go
  25. +2 −2 internal/http/response/json/json_test.go
  26. +1 −1 internal/integration/apprise/apprise.go
  27. +109 −0 internal/integration/discord/discord.go
  28. +72 −4 internal/integration/integration.go
  29. +1 −1 internal/integration/linkace/linkace.go
  30. +15 −3 internal/integration/ntfy/ntfy.go
  31. +138 −0 internal/integration/pushover/pushover.go
  32. +113 −0 internal/integration/slack/slack.go
  33. +19 −18 internal/locale/catalog_test.go
  34. +19 −18 internal/locale/locale.go
  35. +4 −1 internal/locale/plural.go
  36. +4 −0 internal/locale/plural_test.go
  37. +521 −501 internal/locale/translations/de_DE.json
  38. +521 −501 internal/locale/translations/el_EL.json
  39. +523 −503 internal/locale/translations/en_US.json
  40. +522 −502 internal/locale/translations/es_ES.json
  41. +522 −502 internal/locale/translations/fi_FI.json
  42. +519 −499 internal/locale/translations/fr_FR.json
  43. +522 −502 internal/locale/translations/hi_IN.json
  44. +508 −488 internal/locale/translations/id_ID.json
  45. +522 −502 internal/locale/translations/it_IT.json
  46. +508 −488 internal/locale/translations/ja_JP.json
  47. +589 −0 internal/locale/translations/nan_Latn_pehoeji.json
  48. +522 −502 internal/locale/translations/nl_NL.json
  49. +544 −524 internal/locale/translations/pl_PL.json
  50. +521 −501 internal/locale/translations/pt_BR.json
  51. +542 −522 internal/locale/translations/ru_RU.json
  52. +604 −551 internal/locale/translations/tr_TR.json
  53. +544 −524 internal/locale/translations/uk_UA.json
  54. +509 −489 internal/locale/translations/zh_CN.json
  55. +529 −509 internal/locale/translations/zh_TW.json
  56. +2 −2 internal/model/app_session.go
  57. +2 −2 internal/model/enclosure.go
  58. +4 −0 internal/model/feed.go
  59. +10 −0 internal/model/integration.go
  60. +2 −6 internal/oauth2/authorization.go
  61. +0 −2 internal/reader/atom/atom_10.go
  62. +15 −3 internal/reader/atom/atom_10_test.go
  63. +1 −3 internal/reader/date/parser.go
  64. +27 −1 internal/reader/encoding/encoding.go
  65. +348 −0 internal/reader/encoding/encoding_test.go
  66. +7 −0 internal/reader/encoding/testdata/invalid-prolog.xml
  67. +48 −0 internal/reader/encoding/testdata/iso-8859-1-meta-after-1024.html
  68. +10 −0 internal/reader/encoding/testdata/iso-8859-1.html
  69. +7 −0 internal/reader/encoding/testdata/iso-8859-1.xml
  70. +7 −0 internal/reader/encoding/testdata/utf8-incorrect-prolog.xml
  71. +48 −0 internal/reader/encoding/testdata/utf8-meta-after-1024.html
  72. +10 −0 internal/reader/encoding/testdata/utf8.html
  73. +7 −0 internal/reader/encoding/testdata/utf8.xml
  74. +6 −0 internal/reader/encoding/testdata/windows-1252-incorrect-prolog.xml
  75. +6 −0 internal/reader/encoding/testdata/windows-1252.xml
  76. +9 −0 internal/reader/fetcher/response_handler.go
  77. +3 −3 internal/reader/icon/finder.go
  78. +6 −6 internal/reader/opml/opml.go
  79. +1 −1 internal/reader/processor/bilibili.go
  80. +200 −0 internal/reader/processor/filters.go
  81. +1 −1 internal/reader/processor/nebula.go
  82. +1 −1 internal/reader/processor/odysee.go
  83. +5 −276 internal/reader/processor/processor.go
  84. +63 −0 internal/reader/processor/reading_time.go
  85. +92 −52 internal/reader/processor/youtube.go
  86. +34 −0 internal/reader/processor/youtube_test.go
  87. +21 −17 internal/reader/readingtime/readingtime.go
  88. +0 −5 internal/reader/rewrite/referer_override_test.go
  89. +71 −0 internal/reader/rewrite/rewrite_functions.go
  90. +3 −4 internal/reader/rewrite/rewriter.go
  91. +228 −0 internal/reader/rewrite/rewriter_test.go
  92. +10 −13 internal/reader/rewrite/rules.go
  93. +2 −2 internal/reader/rss/adapter.go
  94. +178 −133 internal/reader/rss/parser_test.go
  95. +26 −1 internal/reader/rss/rss.go
  96. +11 −6 internal/reader/sanitizer/sanitizer.go
  97. +48 −3 internal/reader/sanitizer/sanitizer_test.go
  98. +3 −4 internal/reader/sanitizer/truncate.go
  99. +50 −0 internal/reader/sanitizer/truncate_test.go
  100. +1 −1 internal/reader/scraper/rules.go
  101. +3 −2 internal/reader/scraper/scraper.go
  102. +12 −3 internal/reader/subscription/finder.go
  103. +34 −11 internal/reader/urlcleaner/urlcleaner.go
  104. +13 −16 internal/reader/xml/decoder.go
  105. +1 −11 internal/storage/entry.go
  106. +3 −3 internal/storage/entry_pagination_builder.go
  107. +24 −6 internal/storage/feed.go
  108. +9 −1 internal/storage/feed_query_builder.go
  109. +47 −5 internal/storage/integration.go
  110. +12 −0 internal/storage/storage.go
  111. +5 −1 internal/template/templates/common/feed_list.html
  112. +1 −0 internal/template/templates/views/about.html
  113. +1 −1 internal/template/templates/views/category_feeds.html
  114. +40 −3 internal/template/templates/views/edit_feed.html
  115. +62 −1 internal/template/templates/views/integrations.html
  116. +8 −8 internal/template/templates/views/settings.html
  117. +6 −2 internal/timezone/timezone.go
  118. +14 −0 internal/timezone/timezone_test.go
  119. +8 −0 internal/ui/about.go
  120. +1 −0 internal/ui/bookmark_entries.go
  121. +1 −0 internal/ui/category_entries.go
  122. +1 −0 internal/ui/category_entries_all.go
  123. +1 −0 internal/ui/category_entries_starred.go
  124. +29 −0 internal/ui/category_remove_feed.go
  125. +4 −0 internal/ui/feed_edit.go
  126. +1 −0 internal/ui/feed_entries.go
  127. +1 −0 internal/ui/feed_entries_all.go
  128. +18 −0 internal/ui/form/feed.go
  129. +30 −0 internal/ui/form/integration.go
  130. +1 −1 internal/ui/form/settings.go
  131. +10 −0 internal/ui/integration_show.go
  132. +1 −2 internal/ui/settings_show.go
  133. +6 −0 internal/ui/settings_update.go
  134. +1 −0 internal/ui/shared_entries.go
  135. +4 −7 internal/ui/static/css/common.css
  136. +2 −0 internal/ui/static/css/system.css
  137. +1 −1 internal/ui/static/js/.eslintrc.json
  138. +13 −1 internal/ui/static/js/.jshintrc
  139. +12 −14 internal/ui/static/js/app.js
  140. +4 −4 internal/ui/static/js/bootstrap.js
  141. +1 −20 internal/ui/static/js/dom_helper.js
  142. +12 −19 internal/ui/static/js/keyboard_handler.js
  143. +25 −31 internal/ui/static/js/touch_handler.js
  144. +2 −2 internal/ui/static/js/webauthn_handler.js
  145. +1 −1 internal/ui/static/static.go
  146. +1 −0 internal/ui/tag_entries_all.go
  147. +1 −0 internal/ui/ui.go
  148. +1 −0 internal/ui/unread_entries.go
  149. +1 −1 internal/ui/webauthn.go
  150. +26 −0 internal/validator/user.go
  151. +27 −1 internal/validator/validator_test.go
  152. +1 −1 packaging/debian/Dockerfile
  153. +1 −1 packaging/rpm/Dockerfile
  154. +1 −2 packaging/rpm/miniflux.spec
8 changes: 4 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Do you follow the guidelines?
Have you followed these guidelines?

- [ ] I have tested my changes
- [ ] There are no breaking changes
- [ ] I really tested my changes and there is no regression
- [ ] Ideally, my commit messages follow the [Conventional Commits specification](https://www.conventionalcommits.org/)
- [ ] I read this document: https://miniflux.app/faq.html#pull-request
- [ ] I have thoroughly tested my changes and verified there are no regressions
- [ ] My commit messages follow the [Conventional Commits specification](https://www.conventionalcommits.org/)
- [ ] I have read this document: https://miniflux.app/faq.html#pull-request
6 changes: 3 additions & 3 deletions .github/workflows/build_binaries.yml
Original file line number Diff line number Diff line change
@@ -9,13 +9,13 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Golang
uses: actions/setup-go@v5
with:
go-version: "1.23.x"
go-version: "1.24.x"
check-latest: true
- name: Checkout
uses: actions/checkout@v4
- name: Compile binaries
env:
CGO_ENABLED: 0
12 changes: 9 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -5,9 +5,17 @@ permissions: read-all
on:
push:
branches: [ main ]
paths:
- '**.js'
- '**.go'
- '!**_test.go'
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
paths:
- '**.js'
- '**.go'
- '!**_test.go'
schedule:
- cron: '45 22 * * 3'

@@ -22,16 +30,14 @@ jobs:

strategy:
fail-fast: false
matrix:
language: [ 'go', 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.23.x"
go-version: "1.24.x"

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
8 changes: 6 additions & 2 deletions .github/workflows/debian_packages.yml
Original file line number Diff line number Diff line change
@@ -5,11 +5,15 @@ on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
schedule:
- cron: '0 0 * * 1,4' # Runs at 00:00 UTC on Monday and Thursday
pull_request:
branches: [ main ]
paths:
- 'packaging/debian/**' # Only run on changes to the debian packaging files
jobs:
test-packages:
if: github.event.pull_request
if: github.event_name == 'schedule' || github.event_name == 'pull_request'
name: Test Packages
runs-on: ubuntu-latest
steps:
@@ -30,7 +34,7 @@ jobs:
- name: List generated files
run: ls -l *.deb
build-packages-manually:
if: github.event_name != 'pull_request' && github.event_name != 'push'
if: github.event_name == 'workflow_dispatch'
name: Build Packages Manually
runs-on: ubuntu-latest
steps:
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ on:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches: [ main ]
paths:
- 'packaging/docker/**'
jobs:
docker-images:
name: Docker Images
23 changes: 20 additions & 3 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -28,8 +28,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.x"
- run: "go vet ./..."
go-version: "1.24.x"
- uses: golangci/golangci-lint-action@v6
with:
args: >
@@ -39,5 +38,23 @@ jobs:
--enable sqlclosecheck,misspell,gofmt,goimports,whitespace,gocritic
- uses: dominikh/staticcheck-action@v1.3.1
with:
version: "2024.1.1"
version: "latest"
install-go: false

commitlint:
name: Commit Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install commitlint
run: |
npm install --save-dev @commitlint/config-conventional @commitlint/cli
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
- name: Validate PR commits
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
8 changes: 6 additions & 2 deletions .github/workflows/rpm_packages.yml
Original file line number Diff line number Diff line change
@@ -5,11 +5,15 @@ on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
schedule:
- cron: '0 0 * * 1,4' # Runs at 00:00 UTC on Monday and Thursday
pull_request:
branches: [ main ]
paths:
- 'packaging/rpm/**' # Only run on changes to the rpm packaging files
jobs:
test-package:
if: github.event.pull_request
if: github.event_name == 'schedule' || github.event_name == 'pull_request'
name: Test Packages
runs-on: ubuntu-latest
steps:
@@ -21,7 +25,7 @@ jobs:
- name: List generated files
run: ls -l *.rpm
build-package-manually:
if: github.event_name != 'pull_request' && github.event_name != 'push'
if: github.event_name == 'workflow_dispatch'
name: Build Packages Manually
runs-on: ubuntu-latest
steps:
18 changes: 11 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -15,16 +15,20 @@ jobs:
max-parallel: 4
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
go-version: ["1.23.x"]
go-version: ["1.24.x"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout
uses: actions/checkout@v4
- name: Run unit tests
- name: Run unit tests with coverage and race conditions checking
if: matrix.os == 'ubuntu-latest'
run: make test
- name: Run unit tests without coverage and race conditions checking
if: matrix.os != 'ubuntu-latest'
run: go test ./...

integration-tests:
name: Integration Tests
@@ -40,12 +44,12 @@ jobs:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23.x"
- name: Checkout
uses: actions/checkout@v4
go-version: "1.24.x"
- name: Install Postgres client
run: sudo apt update && sudo apt install -y postgresql-client
- name: Run integration tests
103 changes: 103 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,106 @@
Version 2.2.6 (February 22, 2025)
---------------------------------

* test(encoding): add unit tests for `CharsetReader` function
* refactor(xml): improve the performances of `NewXMLDecoder`
* refactor(ui): remove superfluous cast
* refactor(request): broaden an error condition when parsing cookies
* refactor(processor): remove superfluous parenthesis
* refactor(opml): don't define receivers on both values and pointer
* refactor(model): simplify a condition
* refactor(model): don't define methods both on instance and pointer
* refactor(locale): sort JSON documents alphabetically by keys
* refactor(locale): remove superfluous parenthesis
* refactor(js): use proper types in `app.js`
* refactor(js): replace the deprecated `window.pageYOffset` with `window.scollY`
* refactor(js): remove a useless `return`
* refactor(js): anchor `=` removal in `webauthn_handler.js` regex
* refactor(js): add default value for parameter `fallbackSelf` in `goToPage` function
* refactor(integration): don't use `defer` in a loop
* refactor(icon): guard against a potential `null` dereference
* refactor(date): use an else-if instead of two if statements
* refactor(css): use shortcuts to declare padding
* refactor(client): remove a useless cast
* perf(sanitizer): remove two useless calls to `strings.ReplaceAll`
* fix(ui): Redirect correctly post feed removal from category feeds list
* fix(scraper): update TechCrunch scraper rule
* fix(scraper): avoid encoding issue if charset meta tag is after 1024 bytes
* fix(sanitizer): non-allowed attributes are not properly stripped
* fix(sanitizer): correct HTML tag name from `tfooter` to `tfoot`
* fix(rss): handle item title with `CDATA` content correctly
* fix(locale): missing hyphen in `de_DE.json`
* fix(css): avoid aside overflow on the pagination menu
* fix(css): `--entry-content-aside-border-color` is missing from `system.css`
* fix(api): return 500 response when JSON serialization fails
* fix(api): JSON encoding is failing with dates at OAD and negative timezone offset
* feat(urlcleaner): add trackers to the blocklist
* feat(ui): open the `<details>` tag in edit feed page when the feature is enabled
* feat(sanitizer): improve text truncation with better space handling
* feat(sanitizer): allow `img` tags with only a `srcset` and no `src` attribute
* feat(rss): add workaround for RSS item title with HTML content
* feat(pushover): add integration with pushover.net
* feat(processor): fetch YouTube watch time in bulk using the API
* feat(locale): update Traditional Chinese translation
* feat(locale): update Polish translation
* feat(locale): update French translation
* feat(locale): add Taiwanese POJ (nan-Latn-pehoeji)
* feat(integration): update Linkace integration to support API v2
* feat(integration): add webhook URL per feed
* feat(integration): add Slack integration
* feat(css): improve aside element position on smartphone
* ci: update GitHub Actions workflows to use Go 1.24
* ci: trigger packaging tests on pull requests
* ci: add `commitlint` to validate PR commit messages
* build(deps): bump `golang` in `/packaging/debian`
* build(deps): bump `golang.org/x/term` from `0.28.0` to `0.29.0`
* build(deps): bump `golang.org/x/oauth2` from `0.25.0` to `0.26.0`
* build(deps): bump `golang.org/x/net` from `0.34.0` to `0.35.0`
* build(deps): bump `golang.org/x/image` from `0.23.0` to `0.24.0`
* build(deps): bump `golang.org/x/crypto` from `0.32.0` to `0.33.0`
* build(deps): bump `github.com/PuerkitoBio/goquery` from `1.10.1` to `1.10.2`

Version 2.2.5 (January 20, 2025)
--------------------------------

* test(js): improve `.jshintrc` (strict comparison, etc...)
* test(sanitizer): add a fuzzer
* refactor(rewriter): use custom title case converter implementation instead of `golang.org/x/text/cases.Title()`
* refactor(readingtime): replace `whatlanggo` package with an ad-hoc implementation
* refactor(oauth2): no need to use `io.WriteString` when sha256 provides a way to obtain a sum in a single call
* refactor(js): simplify a bit `keyboard_handler.js`
* refactor(js): remove an outdated check for `{passive: true}`
* refactor(js): minor refactoring of `touch_handler.js`
* refactor(js): minor improvements in `app.js`
* refactor(database): add special handling for PostgreSQL-specific migrations
* fix(ui): reading preferences are reset if the form values are incorrect
* fix(sanitizer): allow `<hr>` tags
* fix(finder): do not add redirections to the list of subscriptions to avoid confusion
* fix: update Wallabag URL label to avoid confusion
* fix: improve pagination when having identical publication date
* fix: do not strip tags in Atom entry title
* feat(ntfy): Add option to use internal links
* feat(locale): update Polish translation
* feat(locale): update German translation
* feat(integration): add Discord integration
* feat(database): add optional build support for SQLite
* feat: validate usernames upon creation
* feat: replace `%{?systemd_requires}` with `%{?systemd_ordering}`
* feat: bump linter and minifier from ECMAScript 2017 to 2020 (ES11)
* feat: add `fix_ghost_cards` rewrite rule
* ci: tighten the CodeQL rules
* ci: run Docker tests only when the Dockerfiles are modified
* ci: run `-race -cover` only on Ubuntu jobs
* ci: don't specify languages for CodeQL
* ci: don't run `go vet ./...` as it's run as part of `golangci-lint`
* ci: checkout before installing Go to improve cache efficiency
* ci: avoid building Linux packages for each pull-request
* build(deps): bump `golang.org/x/oauth2` from `0.24.0` to `0.25.0`
* build(deps): bump `golang.org/x/net` from `0.33.0` to `0.34.0`
* build(deps): bump `golang.org/x/crypto` from `0.31.0` to `0.32.0`
* build(deps): bump `github.com/tdewolff/minify/v2` from `2.21.2` to `2.21.3`
* build(deps): bump `github.com/PuerkitoBio/goquery` from `1.10.0` to `1.10.1`
* build(deps): bump `github.com/coreos/go-oidc/v3` from `3.11.0` to `3.12.0`

Version 2.2.4 (December 20, 2024)
---------------------------------

10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -116,6 +116,16 @@ run:
clean:
@ rm -f $(APP)-* $(APP) $(APP)*.rpm $(APP)*.deb $(APP)*.exe $(APP)*.sha256

.PHONY: add-string
add-string:
cd internal/locale/translations && \
for file in *.json; do \
jq --indent 4 --arg key "$(KEY)" --arg val "$(VAL)" \
'. + {($$key): $$val} | to_entries | sort_by(.key) | from_entries' "$$file" > tmp && \
mv tmp "$$file"; \
done


test:
go test -cover -race -count=1 ./...

4 changes: 2 additions & 2 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -27,10 +27,10 @@ import (

func main() {
// Authentication with username/password:
client := miniflux.New("https://api.example.org", "admin", "secret")
client := miniflux.NewClient("https://api.example.org", "admin", "secret")

// Authentication with an API Key:
client := miniflux.New("https://api.example.org", "my-secret-token")
client := miniflux.NewClient("https://api.example.org", "my-secret-token")

// Fetch all feeds.
feeds, err := client.Feeds()
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ type Client struct {
}

// New returns a new Miniflux client.
//
// Deprecated: use NewClient instead.
func New(endpoint string, credentials ...string) *Client {
return NewClient(endpoint, credentials...)
2 changes: 1 addition & 1 deletion client/request.go
Original file line number Diff line number Diff line change
@@ -145,7 +145,7 @@ func (r *request) execute(method, path string, data interface{}) (io.ReadCloser,

func (r *request) buildClient() http.Client {
return http.Client{
Timeout: time.Duration(defaultTimeout * time.Second),
Timeout: defaultTimeout * time.Second,
}
}

Loading