Table of contents
- 2024-10-03
- Plan (constantly changing as per what's below)
- Email duplicate check on confirmation
- Investigating the "confirm token"
- Figuring out when requires_email_confirmation is TRUE
- Figuring out when a pseudo user can have an email
- Figuring out if account takeover is possible on signup.js with a uuid
- Figuring out when send_confirmation_code is TRUE in REQUEST
- Current Thoughts
- Find places where (on backend) email change process is triggered
2024-10-03
Plan (constantly changing as per what's below)
signup.jsonly says "email already used" if the one that's already been used is confirmed.- "change email" needs to follow the same logic; show an error when an email already exists on an account with a confirmed email. Then, upon confirming the update, Ensure that in the meanwhile no new account came up with that email set.
- ensure
clean_emailis updated whenever the email is updated
Email duplicate check on confirmation
- signup.js:149 -> this is where email dupe is currently checked
- signup.js:290 -> This is where we send the confirmation email. There is also a branch that sends a "confirm token". I don't recall what this is for.
Investigating the "confirm token"
- email template is
email_verification_codeinstead ofemail_verification_link - This happens when either:
- user.requires_email_confirmation is TRUE
- send_confirmation_code is TRUE in REQUEST
Figuring out when requires_email_confirmation is TRUE
I'm mostly curious about this state on a user.
It's strange that signup.js would do anything on EXISTING users.
pseudo_usermay be populated ifreq.body.emailexists AND a user with no password exists with that emailuuid_usermay be populated if a user exists with the specified UUID, but it has no usefulness unlessuuid_userhas the same id aspseudo_user.
uuid_user is only used to set email_confirmation_required to 0
IFF pseudo_user has same id as uuid_user
AND psuedo_user has an email
When does pseudo_user have an email?
Figuring out when a pseudo user can have an email
- asking NJ, I'm at a loss on this one for the moment
Figuring out if account takeover is possible on signup.js with a uuid
- Nope, looks like
uuid_useris only used to setemail_confirmation_required = 0
Figuring out when send_confirmation_code is TRUE in REQUEST
- IFF
require_email_verification_to_publish_websiteis TRUE- it's not currently, but we need this to be possible to enable
- ^ That seems to be the ONLY place when this matters
Current Thoughts
-
email_verification_codewill be difficult to test because there is nothing currently in the system that's using it. However, I could try enablingrequire_email_verification_to_publish_websitelocally and see if this behavior begins to work as expected. -
email_verification_linkwhere we can confirm an email. If another email was already confirmed since the time the link was sent, we need to display an error message to the user.
Find places where (on backend) email change process is triggered
Right now there are two handlers:
/user-protected/change-email(UserProtectedEndpointsService)- Invokes the process (sends confirmation email)
/change_email/confirm(PuterAPIService)- Endpoint that the email link points to
General
API
- Index (README.md)
- api drivers
- Group Endpoints
- Notification Endpoints
- Share Endpoints
- Type-Tagged Objects
Concepts
Types
For Contributors
- Comment Prefixes
- contributors vscode
- Local Email Testing
- Puter Extensions
- Repository Structure and Tooling
Extensions
Devmeta
Planning
- Micro Modules
- [planning alternatives_to_
](planning-alternatives_to_)
Self_hosters
- Configuring Domains for Self-Hosted Puter
- Configuring Puter
- First Run Issues
- self_hosters config_values
- self_hosters support
- Self-Hosting Puter
Src
Backend
A_and_A
For Contributors
- Backend Style
- Puter Backend - Directory Structure
- Puter Backend Boot Sequence
- Puter Kernel Moduels and Services
Features
- Batch and Symlinks
- Metered Services and Cost Management
- Protected Apps and Subdomains
- Service Scripts
Lists_of_things
Modules
Puterai
Notes
Services
Src
Modules
Puterai
- Index (README.md)
- Configuring AI Services
- PuterAI API Request Examples
- src backend src modules puterai config
####### For Contributors
Test_drivers
Gui
Phoenix
Tools
Api_tester
Uncategorized
This wiki is generated from the repository. Do not edit files the wiki.
You are reading documentation for Puter, an open-source high-level operating system.
Getting started with Puter on localhost is as simple as:
git clone https://github.com/HeyPuter/puter.git
npm install
npm run start