New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page preview leaks included content without permissions #1178

Closed
ezzra opened this Issue Dec 12, 2018 · 1 comment

Comments

2 participants
@ezzra
Copy link

ezzra commented Dec 12, 2018

Describe the bug
When there is included content at beginning of the page that should not be accessible by the User it wil still be shown in the page preview.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Create page1 without reading permissions for user1 and write anything within there
  2. Get the content include code by double clicking
  3. Create page2 with reading permission for user1
  4. Include the content (for example with {{@3#bkmrk-example-of-a-text-inc}}) into the first lines
  5. login as user1

You should not be able to read page1, you should not see the content from page1 in page2, but you will see the content of page1 in the pagelist summary

Screenshots
screenshot_2018-12-12_14-49-50
screenshot_2018-12-12_14-49-32

More
I guess the source of the problem is very simple, when the preview is generated it does not check for the include permissions. This problem seems to be introduced with #442. By the way, one more reason for #1126 ;)

@ezzra ezzra changed the title page preview leaks content that should not accessible page preview leaks included content without permissions Dec 12, 2018

@ssddanbrown ssddanbrown added this to the BookStack Beta v0.25.0 milestone Dec 16, 2018

@ssddanbrown

This comment has been minimized.

Copy link
Member

ssddanbrown commented Jan 5, 2019

Thanks for reporting @ezzra.

Now updated to exclude include tags when generating stored text content.
Will need to include a notice for the next update to advised re-saving existing content that may be sensitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment