Activation key can activate a different account whose email differs only in case

Open Beginner friendly
#6,410 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Madhu-priya123 is already working on this.

Since Nov 26, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
django, python

Research direction

Start with UserActivationView.get_user in contentcuration/contentcuration/views/users.py and User.get_for_email in contentcuration/contentcuration/models.py to trace how the activation key selects an inactive account. Add a regression test for the two addresses that differ only in case, checking that each key activates only its matching account. Done when the test passes and both accounts activate independently.

Written by the indexing model from the issue text.

Description

DEV: backend

Overview

UserActivationView.get_user finds the account to activate with User.get_for_email(username, is_active=False), which matches email case-insensitively and returns the newest matching inactive record. When two inactive accounts differ only in email case, the activation key for one activates the other. Registration now rejects case-insensitive duplicates, so only older duplicate accounts are affected.

Complexity: Low
Target branch: hotfixes

Context
The Change
  • Activation should activate the account whose email exactly matches the one in the key.
Acceptance Criteria
General
  • With two inactive accounts whose emails differ only in case, each account's activation key activates that account and no other.
Testing
  • The reproduced case in Context has a regression test.

AI usage

I scoped the audit. Claude Code found and reproduced this failure and drafted this issue.

Dominant language
JavaScript
Stars
214
Forks
327
Avg merge
17h 5m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from learningequality/studio

All issues in learningequality/studio

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.