Repository navigation
[pull] main from miniflux:main - #351
Merged
Merged
Conversation
The listening Unix socket was created world-writable (0666), allowing any local user to connect. Restrict it to the owner and group. Deployments where the reverse proxy runs as a different user now need that user to share a group with the Miniflux process.
The guard in RemoveAndReplaceCategoriesByName counted categories with "title != ANY($2)", which is true whenever the title differs from at least one element of the array. With two or more titles in the list, every category matched — including the ones being deleted — so the "at least 1 category must remain" check could pass even when the deletion would remove all of the user's categories, leaving feeds with a NULL category. Using "title <> ALL($2)" counts only the categories that would actually survive the deletion.
The total returned by GetEntriesWithCount comes from count(*) OVER(), which is carried on the returned rows. When the requested offset lands past the last matching row, the query returns no rows and the total was reported as 0 even though matching entries exist, breaking clients that paginate until offset >= total. Fall back to a separate CountEntries() query when the page is empty and the offset is greater than zero. With offset 0 an empty result genuinely means zero matches, so the single-query fast path is unchanged for normal requests. Add an integration test requesting the page at offset == total, which must return no entries while keeping the same total.
ValidateUserModification reused ValidateEntryOrder, which accepts nine
sorting fields valid for the entry-listing order query parameter, while
the users.entry_order column is an entry_sorting_order enum allowing
only published_at and created_at. Requests such as
PUT /v1/users/{id} with entry_sorting_order=title passed validation and
failed in PostgreSQL, returning 500 instead of 400.
Validate the user preference against the enum values with a dedicated
validateEntrySortingOrder function and keep ValidateEntryOrder for the
entry-listing endpoint.
An empty proxy_url in a feed modification request was rejected with error.proxy_url_not_empty, so a proxy URL could never be unset once configured. Accept the empty string to clear it, matching feed creation, and only validate non-empty values.
CreateFeed copied every other option from the feed creation request but never NoMediaPlayer, so the flag was silently dropped and always stored as false when creating a feed.
WithLimit ignored a zero limit, so /v1/entries?limit=0 produced a query without a SQL LIMIT and returned every matching entry, bypassing the 1000-entry cap. The official API client sends limit=0 for any filter with an unset Limit field, making unbounded queries easy to trigger. Clamp non-positive values to the maximum in both WithLimit and WithLimitAndMaximum so every caller (REST API, Google Reader) stays bounded, as intended by 0909323.
SCHEDULER_ENTRY_FREQUENCY_FACTOR was the only scheduler option without a validator, so 0 was accepted at startup. With the entry_frequency polling scheduler, the factor is used as part of a divisor in ScheduleNextCheck, and a feed with weekly entries then triggered a division-by-zero panic inside a background worker, crashing the daemon. Require the factor to be >= 1, matching the validation of the other scheduler options, so the misconfiguration fails at startup instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )