mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 14:35:52 +03:00
[GH-ISSUE #578] [Security] Thumbnails of private bookmarks are accessible without authentication #308
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#308
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @andrigamerita on GitHub (Feb 13, 2023).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/578
Data
Raspbian GNU/Linux 11 (bullseye),Linux raspberrypi 5.15.84-v7+ #1613 SMP Thu Jan 5 11:59:48 GMT 2023 armv7l GNU/LinuxDescribe the bug / actual behavior
If the
/bookmark/{ID}/thumbHTTP endpoint of a Shiori instance running inservemode is reached, where ID is the numeric id of an existing saved bookmark, the image file that is a thumbnail of the corresponding bookmark is returned, regardless of if the bookmark in question is private and the current HTTP request is not authenticated.Expected behavior
If the above mentioned endpoint is reached, the software should return data of the thumbnail image file only if at least one of the following conditions are met, otherwise it should redirect to the login page exactly as it already correctly happens with the
/bookmark/{ID}/contentand/bookmark/{ID}/archiveendpoints (ot, at the very least, deny access with an error):To Reproduce
Steps to reproduce the behavior:
/bookmark/{ID}/contentor/bookmark/{ID}/archiveHTTP endpoints of a Shiori instance running inservemode (which is correct behavior)/bookmark/{ID}/thumbstill without having a valid session, and notice that the thumbnail file is accessible as if the article it belongs to wasn't private (which shouldn't happen)Screenshots
Not applicable.
Curl demonstration
@Monirzadeh commented on GitHub (Jul 1, 2023):
@andrigamerita thanks for your report, I send a PR to fix that.