Skip to content

Add option to disable anonymous pad creation on the server side #1724

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

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from

Conversation

Wolf480pl
Copy link

This is my first attempt at fixing #625

Looks like concept of "user" is very ambiguous in cryptpad, so I assumed Users.getAll are the registered users.
As far as I understand, in registration-disabled mode, these include all users created by accepting an invitation.
The admin can also add users manually to that list, which sounds useful.
Not sure how this handles SSO though.
Also, should I allow admins to create pads, even if they're not in Users?

I'd appreciate suggestions about better ways of obtaining something akin to a list of registered users.

Also, AFAIU this only prevents creation of channels (which seems to include userobjects, drive, etc) but not pins, blocks, and possibly other kinds of things that could be abused by an attacker to store arbitrary data.
I don't have a good grasp of those, or a good way to test for that (looks like the official client won't try to do these things when not logged in) so I'd also appreciate any pointers on how to handle those things.

Also, I don't have much experience with JS, so my code probably looks very awkward and unidiomatic - sorry about that.

@Wolf480pl
Copy link
Author

Also it breaks invites, I'll try to fix that.

@mathilde-cryptpad mathilde-cryptpad changed the base branch from main to staging December 2, 2024 11:06
@mathilde-cryptpad mathilde-cryptpad added the Feature Request Something you want that isn't implemented label Dec 2, 2024
@Wolf480pl Wolf480pl force-pushed the disable-anon-pad-creation branch from ac81cd0 to a1e325b Compare December 2, 2024 19:29
@Wolf480pl
Copy link
Author

Wolf480pl commented Dec 2, 2024

I just realized it also breaks login, because edPrivate is not stored in the block nvm

@Enteee
Copy link
Contributor

Enteee commented Dec 5, 2024

@Wolf480pl this would be such a cool feature !
See: #704 which is related to this.

@Wolf480pl
Copy link
Author

I was trying to wrap my head around the frontend code responsible for the login and registration, and how it stores account data on the server, in order to make invites work with this change. But it's quite complex, and I ran out of time. I may try to return to this in the future, but if anyone else wants to give it a try that'd be cool too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Something you want that isn't implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants