When I submit the password reset form (https://bna.peopleforbikes.org/#/password-reset-request/), it says "Password reset successfully requested", but that's not so. The request is actually coming back with a 500 error, and this shows up in Papertrail:
This seems likely to be fallout from the Django upgrade, though it could also be just a change in the package itself. In any case, we need to figure out how to properly import it.
We also need to fix the front-end so that it shows an error when there's an error, rather than declaring success regardless.
Workaround
I don't think there's a quick/easy way to get the emails to send--even if the fix is a one-line change to settings, as seems likely, it will require a redeploy to make it take effect. But it's possible to generate a password reset link manually.
Get a Django shell in the app, i.e.:
Load the production SSH key
ssh -A ec2-user@bastion.bna.peopleforbikes.org
Figure out the internal IP of an instance that's running an app task (look in the AWS console), and SSH to that
Run docker ps and get the container ID of an app task (the image will include pfb-app and the command starts with /usr/local/bin/gunicorn)
Run docker exec -ti CONTAINER_ID bash to get a shell in that container
Run ./manage.py shell_plus to get a Django shell
Run this (replacing the EMAIL_ADDRESS... bit with the desired email address):
from django.conf import settings
from django.core.signing import TimestampSigner
from users.models import PFBUser
user = PFBUser.objects.get(email="EMAIL_ADDRESS_OF_USER_TO_RESET")
signer = TimestampSigner(salt=settings.RESET_SALT)
token = signer.sign('{}'.format(user.uuid))
print('https://bna.peopleforbikes.org/#/password-reset/?token={}'.format(token))
Copy the resulting URL. It should work to reset that accounts password. It will expire after 24 hours.
When I submit the password reset form (https://bna.peopleforbikes.org/#/password-reset-request/), it says "Password reset successfully requested", but that's not so. The request is actually coming back with a 500 error, and this shows up in Papertrail:
This seems likely to be fallout from the Django upgrade, though it could also be just a change in the package itself. In any case, we need to figure out how to properly import it.
We also need to fix the front-end so that it shows an error when there's an error, rather than declaring success regardless.
Workaround I don't think there's a quick/easy way to get the emails to send--even if the fix is a one-line change to settings, as seems likely, it will require a redeploy to make it take effect. But it's possible to generate a password reset link manually.
ssh -A ec2-user@bastion.bna.peopleforbikes.org
docker ps
and get the container ID of an app task (the image will includepfb-app
and the command starts with/usr/local/bin/gunicorn
)docker exec -ti CONTAINER_ID bash
to get a shell in that container./manage.py shell_plus
to get a Django shellRun this (replacing the EMAIL_ADDRESS... bit with the desired email address):