Skip to content

Conversation

@findus
Copy link

@findus findus commented Oct 7, 2025

No description provided.

@findus
Copy link
Author

findus commented Oct 7, 2025

Not ready yet: We cannot create tasks right now because anonymous tasks are forbidden now, when anonymous pads are disabled

@findus findus marked this pull request as draft October 10, 2025 09:34
@JJ-8
Copy link
Collaborator

JJ-8 commented Dec 19, 2025

Haha great to see that my implementation of 4 years ago is still interesting :)
From what I remember, the trick was to create each pad with a 'CTFNote' account in Hedgedoc. Those creds are stored somewhere in a table in the database and never exposed.
And then for each user:

  1. When they register, automatically create a hedgedoc account and insert those creds into the database (with the exact same implementation as Hegedoc does)
  2. When they login and do not have a Hedgedoc account, do the same trick as register and then...
  3. When they login and do have an account, create a login request to Hedgedoc to also authenticate them there. Copy the cookies from that response to the login request of the user such that they will get the Hedgedoc cookies as well.

When this is all done, the user is authenticated and can create pads themself. And each pad is created by the CTFNote user, thus anonymous pads can be disabled. And last, it is important to disable the /register endpoint from Hedgedoc itself to prevent random users from registering an account (this can be done by dropping the request through nginx).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants