[PR #1165] [CLOSED] Dirty feed #5784

Closed
opened 2026-02-05 10:17:01 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/1165
Author: @ezzra
Created: 12/9/2018
Status: Closed

Base: releaseHead: dirty_feed


📝 Commits (2)

  • 2d2bec2 add dirty feed code
  • 4fe3ca7 dirty-feed fix missing revision error

📊 Changes

6 files changed (+311 additions, -114 deletions)

View changed files

📝 app/Actions/Activity.php (+90 -1)
📝 composer.json (+2 -1)
📝 composer.lock (+184 -112)
config/feed.php (+29 -0)
📝 resources/views/base.blade.php (+2 -0)
📝 routes/web.php (+4 -0)

📄 Description

this is not really a pull request, just if people want to keep track of this dirty feed workaround (see #147):

Because we have a need for RSS in our team, I hacked a dirty feed solution in https://github.com/ezzra/BookStack/tree/dirty_feed

It is actually working, if you want to reuse it (@nekromoff and others), commit it to your code. Then run composer install and add APP_FEED_TOKEN=xxx to your .env. Of course, xxx should be any random string, that makes the feed accessible without logging in!

Be aware! The code is really dirty and its just working without beeing pretty, so please keep in mind:

  • there are separated feeds for a book (all sortings and page changes within a book), a chapter (all page changes within a chapter), a page (all changes to this page)
  • shelves are not included yet because we dont use them (harhar), but you might be able to adapt it to the code if you like
  • you can just use your browsers feed button, the feed button is everywhere, but it only works on a book, chapter or page site
  • you must set the feed token, otherwise the feed will be accessible from not logged in users easily.
  • the guest user must have a role with readaccess to all books/chapters/pages (this is default setting in bookstack!)
  • any user who has a login and gets knowledge about the feed token has access to the whole feed! So even when she has no access to a specific book or page, she can access the feed because it is only guarded by the system wide feed token!
  • this is also the fact if you delete an account, the user will still have access to the feed (unless you change the token)!
  • the feed does not tell anything about the content of a page, just "metadata"

so you can see, its a fast dirty hack, but it works. It could be made better of course. But its a wrong way, because there much more needs to be a system internal solution for subscriptions where notifications can be created in different ways (email, OS notification, RSS, ...) only for specific user accounts. That is why I wont put more work into that dirty way here.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/1165 **Author:** [@ezzra](https://github.com/ezzra) **Created:** 12/9/2018 **Status:** ❌ Closed **Base:** `release` ← **Head:** `dirty_feed` --- ### 📝 Commits (2) - [`2d2bec2`](https://github.com/BookStackApp/BookStack/commit/2d2bec20eb9cf6a798e682cf94aab8376aac8516) add dirty feed code - [`4fe3ca7`](https://github.com/BookStackApp/BookStack/commit/4fe3ca75bdd3dc1dc47bbe6e3ccde66e63faa3a2) dirty-feed fix missing revision error ### 📊 Changes **6 files changed** (+311 additions, -114 deletions) <details> <summary>View changed files</summary> 📝 `app/Actions/Activity.php` (+90 -1) 📝 `composer.json` (+2 -1) 📝 `composer.lock` (+184 -112) ➕ `config/feed.php` (+29 -0) 📝 `resources/views/base.blade.php` (+2 -0) 📝 `routes/web.php` (+4 -0) </details> ### 📄 Description **this is not really a pull request, just if people want to keep track of this dirty feed workaround (see #147):** Because we have a need for RSS in our team, I hacked a **dirty** feed solution in https://github.com/ezzra/BookStack/tree/dirty_feed It is actually working, if you want to reuse it (@nekromoff and others), commit it to your code. Then run `composer install` and add `APP_FEED_TOKEN=xxx` to your `.env`. Of course, `xxx` should be any random string, that makes the feed accessible without logging in! Be aware! The code is really dirty and its just working without beeing pretty, so please keep in mind: * there are separated feeds for a book (all sortings and page changes within a book), a chapter (all page changes within a chapter), a page (all changes to this page) * shelves are not included yet because we dont use them (harhar), but you might be able to adapt it to the code if you like * you can just use your browsers feed button, the feed button is everywhere, but it only works on a book, chapter or page site * you **must** set the feed token, otherwise the feed will be accessible from not logged in users easily. * the guest user must have a role with readaccess to all books/chapters/pages (this is default setting in bookstack!) * **_any user who has a login and gets knowledge about the feed token has access to the whole feed_**! So even when she has no access to a specific book or page, she can access the feed because it is only guarded by the system wide feed token! * this is also the fact if you delete an account, the user will still have access to the feed (unless you change the token)! * the feed does not tell anything about the content of a page, just "metadata" so you can see, its a fast dirty hack, but it works. It could be made better of course. But its a wrong way, because there much more needs to be a system internal solution for subscriptions where notifications can be created in different ways (email, OS notification, RSS, ...) only for specific user accounts. That is why I wont put more work into that dirty way here. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:17:01 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5784