Registration (case-insensitive unique names, 8-256 char passwords, no email), sign-in with a generic error and a fresh session, internal-only ?next=, POST-only sign-out, password change that closes the other sessions. The failed-login backoff, the registration quota and the password-change guard live in the database so every web process shares them; the client IP is the last X-Forwarded-For hop. One responsive stylesheet with light/dark theme, labelled fields, alerts and no inline scripts or styles; Italian error pages and a readable CSRF failure. Mutation checks: open redirects, uncounted failures and a missing CSRF middleware are all caught. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
27 lines
848 B
Python
27 lines
848 B
Python
# Generated by Django 5.2.19 on 2026-11-16 12:52
|
|
|
|
import django.utils.timezone
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('accounts', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='ThrottleEvent',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('scope', models.CharField(max_length=16)),
|
|
('key', models.CharField(max_length=150)),
|
|
('created_at', models.DateTimeField(default=django.utils.timezone.now)),
|
|
],
|
|
options={
|
|
'indexes': [models.Index(fields=['scope', 'key', 'created_at'], name='accounts_th_scope_248904_idx')],
|
|
},
|
|
),
|
|
]
|