Hi, I recently started using a self-hosted instance of writefreely as my public blog as well as a private diary.
One thing that took a little getting used to was the fact that drafts are all publicly accessible, albeit secured behind a secret URL. It took a while but I soon wrapped my head around it - these posts were eventually going to be public anyway, so doesn’t hurt too much for them to be leaked. It’s a really elegant workflow.
The thing that gave me a slight panic today was when I discovered that posts that were destined for my private diary blog also had draft hash URLs attached to them, and continued to be publicly accessible even after they have been published to my private diary blog.
Here’s how you can reproduce it:
- Create a new post
- Publish it to Drafts
- Copy the draft link
- Navigate to the Drafts page (/me/posts/)
- Use the “move to” dropdown menu to move the post to a private blog
- Open the link copied in (3) in an incognito browser window
- Observe that the post can still be viewed
I am conscious that this could very well be a desired feature rather than a bug, but for the use-case where a post is destined for a private blog, this public accessibility might be unexpected.
For my own purpose, I’ve forked and added a tiny config.ini flag called private_drafts
which, when true
, makes drafts only accessible to their owners. Enabling this sadly locks down the ability for drafts to be shared around, but in the case where I am a sole author for my public writing, and also write privately, it’s a trade-off that I’m happy to make.
Here is the commit:
It works fine for my needs, but I was wondering if this is something that you might be open to merging upstream. I’m more than happy to cut a PR, take any feedback and make improvements to my code submission if it means I don’t need to maintain and build my own fork
Also, totally understand if this is not a direction that you want to take this project.
Thanks!
p.s. Apologies if I posted this in the wrong category. Feel free to re-categorise or point me to a more suitable one.