-
Notifications
You must be signed in to change notification settings - Fork 327
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
Block cloning from brew metadata #3637
base: master
Are you sure you want to change the base?
Conversation
…ponding backend model update"
…ing disabled brews, and refactored source and download page logic"
Possibly should use 401 UNAUTHORISED instead of 423 LOCKED. The brew is not locked, the user needs to authenticate with credentials that are allowed to clone this brew. (Also not 403 FORBIDDEN, which is for when the particular action is not allowed at all, for any user.)
|
That seems like a good idea. |
Though I am slightly worried by this (a
No, wait .. I was thinking this is the header that cause the browser to prompt for BASIC authentication. It can also be things like
OK, 401 FORBIDDEN, with something like that. |
I am not sure if the final conclusion of your post is that i should include that or not |
yes, do eet.
|
do we really want people having to enter username and password there? because that triggers the basic auth |
Only if the |
I just want to clarify the intent with the PR: this doesn't just block "Clone to New", but also prevents viewing the Philosophically, does a majority of users/contributors want the ability to hide their source code? Personally, I prefer that all published brews can be studied and/or cloned. If a user doesn't want it cloned, they can choose to not Publish on homebrewery, generate a PDF, and then share that PDF. If we have an option to 'lock it down', we are still powerless to hide the browser Inspect tool, which to me is sort of an 'unfulfilled promise'. However, take that with a boat-sized cube of salt, since I'm not really a brew creator and so it's pretty low-stakes for me. I understand that certainly some more professional users would like to prevent copying to whatever degree possible. |
Also, the screenshots for the examples above are a little confusing. You say
But the image is of the This PR also displays Download and Source the same, though still separate routes. It's presented as a box inside a box. I'm not sure this is an improvement over the plain text of the current You mention it is done this way in order to handle authentication? What about keeping the Meaning, clicking the "Source" button wouldn't navigate you away from Just a thought. I know that is a big change from what you have currently. |
The title should probably be "test brew with cloning not allowed by non-authors" for expository reasons.
Technically, the /source/ page is an html page with styles that makes it look like plain text. This was likely done because some old browsers would sniff the content, see html tags, and treat it as if it was html .. despite the The
The It is possible to have a "download" button that constructs in-browser a blob which is then targetted by a hidden link and trigger a download via a simulated click link. Or a simple button that has an actual URI that links to the server that responds with a resource with a Given that, and given that the simpler solution of |
That is my understanding. It should also block the |
Yes, it started with me preventing users to clone by simply removing the clone button, and it kinda grew from there when i realized those two other pages also would allow cloning.
Every user that only shares the pdf and not the share page would prefer their source code protected i would guess.
We could link the cloning and source availability to published status, but i am not sure they should be linked, a user might want their brew available to viewing in the Vault, but not want it cloned (platform vs tool talk here) |
Yes, sorry, we would probably want to create a name for this, see, this PR disables the nav source dropdown, i can add a screencap of the nav without the button, but doesn't really give you any info, just the nav without a menu.
I can delete one of the buttons, and indicate you can download from source. But i am not sure we want to delete the two routes just yet, since i seem to recall some other platform was using our download or source route to get brew info. Should probably wait for #3481 to be merged before deleting routes. About the looks, i think the current source is almost unnaceptable, at least the navigation bar should be there, for users to navigate back, it is still a part of our tool. I picked the UI page because it was the closest we had to an empty page where to put the code.
It started that way, but the feeling that this should use our UI has turned out to be the strongest point, i figured out how to do the auth filter from App.js
Not a terrible idea, but do see my point above
Not really, it'll take me some time though. |
good point, alright, given all the talk, i will move the download route back, but keep the download button in the source page. |
There is a problem with that. If a user has set a brew to share themes via the theme tag, which is the only way(i think) of using those routes, why would we block the css resource? |
If someone was really determined to lift a brews style, they could pull it so many ways. I'm unsure there's any point in trying to stop this one. |
This PR worries about the content of brews, because this is a tool to create homebrew content of RPGs. It is to difficult cloning to avoid content stealing. As it stands, it may need a rework, but i don't think it should block any css resource routes. |
Side note: while we are looking into restoring the It would also serve up the actual brew code in the Server side rendering, without the call to render in the browser, could mean we could provide the rendered brew without revealing the brew code (i.e. in the http resource payload as the parameter to the If we really wanted to prevent cloning, we'd need to do the same with the |
We'd only want to enable server-only-not-client-rendering for those brews specifically marked do-not-steal .. otherwise every /share page view will place a cpu demand on the server. |
Not sure we need to go that far, 90% of users would be stopped by just disabling the source endpoint and the cloning process itself. |
All I'm saying is it's an option with a known solution that has previously worked. If we do go ahead with a promise of "you can set a flag on your brew so that no one can steal your source" .. then it would be low effort to avoid a very bad broken promise (even if low risk). |
I have added an extra field to control if a brew should be able to be cloned.