Skip to content

Conversation

@jvoisin
Copy link
Collaborator

@jvoisin jvoisin commented Jul 15, 2025

When there is no user of Fever/GoogleReader, there is no need to expose their endpoints. This reduces quite a bit the exposition surface of miniflux, while not breaking any existing deployments, and is pretty self-contained.

This comment was marked as outdated.

Copy link
Member

@fguillot fguillot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting a 500 when no integration is enabled in the DB: store: unable to check if fever is used: sql: no rows in result set. Please test your changes and/or add some tests.

@jvoisin jvoisin marked this pull request as draft August 1, 2025 11:47
jvoisin added a commit to jvoisin/v2 that referenced this pull request Aug 2, 2025
… used miniflux#3543

When there is no user of Fever/GoogleReader, there is no need to expose their
endpoints. This reduces quite a bit the exposition surface of miniflux, while
not breaking any existing deployments, and is pretty self-contained.
@jvoisin
Copy link
Collaborator Author

jvoisin commented Aug 2, 2025

You're right, I should have tested this more thoroughly. I played with it locally, with fever/google reader enabled/disabled, and it seems to be working properly now.
Thanks for you patience!

jvoisin added a commit to jvoisin/v2 that referenced this pull request Aug 2, 2025
… used miniflux#3543

When there is no user of Fever/GoogleReader, there is no need to expose their
endpoints. This reduces quite a bit the exposition surface of miniflux, while
not breaking any existing deployments, and is pretty self-contained.
@jvoisin jvoisin requested a review from Copilot August 2, 2025 21:03

This comment was marked as outdated.

@jvoisin jvoisin marked this pull request as ready for review August 2, 2025 21:06
@jvoisin jvoisin marked this pull request as draft August 2, 2025 21:26
jvoisin added a commit to jvoisin/v2 that referenced this pull request Aug 3, 2025
… used miniflux#3543

When there is no user of Fever/GoogleReader, there is no need to expose their
endpoints. This reduces quite a bit the exposition surface of miniflux, while
not breaking any existing deployments, and is pretty self-contained.
@jvoisin jvoisin requested a review from Copilot August 3, 2025 14:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR automatically disables Fever and Google Reader API endpoints when no users have these integrations enabled, reducing the attack surface of Miniflux without breaking existing deployments.

  • Adds database queries to check if Fever and Google Reader integrations are actively used
  • Implements middleware to return unauthorized responses when integrations are disabled
  • Integrates the new middleware into both Fever and Google Reader API routing

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/storage/integration.go Adds IsFeverUsed() and IsGoogleReaderUsed() methods to check if integrations are enabled
internal/fever/middleware.go Adds middleware to return 401 when Fever is not used by any user
internal/fever/handler.go Integrates the new authorization middleware into Fever routing
internal/googlereader/middleware.go Adds middleware to return 401 when Google Reader is not used by any user
internal/googlereader/handler.go Integrates the new authorization middleware into Google Reader routing

jvoisin added a commit to jvoisin/v2 that referenced this pull request Aug 3, 2025
… used miniflux#3543

When there is no user of Fever/GoogleReader, there is no need to expose their
endpoints. This reduces quite a bit the exposition surface of miniflux, while
not breaking any existing deployments, and is pretty self-contained.
@jvoisin jvoisin marked this pull request as ready for review August 3, 2025 14:09
jvoisin added a commit to jvoisin/v2 that referenced this pull request Sep 16, 2025
… used miniflux#3543

When there is no user of Fever/GoogleReader, there is no need to expose their
endpoints. This reduces quite a bit the exposition surface of miniflux, while
not breaking any existing deployments, and is pretty self-contained.
jvoisin added a commit to jvoisin/v2 that referenced this pull request Sep 16, 2025
… used miniflux#3543

When there is no user of Fever/GoogleReader, there is no need to expose their
endpoints. This reduces quite a bit the exposition surface of miniflux, while
not breaking any existing deployments, and is pretty self-contained.
… used miniflux#3543

When there is no user of Fever/GoogleReader, there is no need to expose their
endpoints. This reduces quite a bit the exposition surface of miniflux, while
not breaking any existing deployments, and is pretty self-contained.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants