To reproduce:
- start creating a new Article
- upload an image (but dont save the node)
- hit preview link and get "access denied"
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | preview_page_return-2790809-2.patch | 5.01 KB | bleen |
To reproduce:
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | preview_page_return-2790809-2.patch | 5.01 KB | bleen |
Comments
Comment #2
bleen commentedThis patch solves the issue by adding a token to the preview link ... hopefully I can get a hold of someone who knows security a little better than I do to verify that this is a good solution, but based on my research it seems like a good fix ...
Comment #3
bleen commentedI discussed this strategy today with @coltrane and he agreed that this was a sound strategy. He did point out that I needed to test what happens if no token is provided at all. I did that, and no exception is thrown in that case; instead the alternative logic of checking if a user has access to edit an entity that references the image in question.
With that, I'm going to mark this as RTBC
Comment #5
bleen commented