A similar issue has come up multiple times: the user
changes account's email address, enters a bad address
by mistake, and gets locked out of their account.
This commit adds an extra step in the "Change Email" flow:
* In "Account Settings", user clicks on [Change Email]
* User gets a prompt for a 6-digit confirmation code, which
has been sent to their old address. This is to prevent
account takeover when Eve sits down at a computer where Alice
is logged in.
* The user enters the confirmation code, and a "Change Email"
form loads.
* The user enters their new email address.
* (The new step!) Instead of changing the email right away,
we send a special login link to user's specified new address.
* (The new step, continued) The user clicks on the login link,
their account's email address gets updated, and they get
logged in.
The additional step makes sure the user can receive email
at their new address. If they cannot receive email there,
they cannot complete the "Change Email" procedure.
The header format is:
Ping-Body-Limit: n
Where "n" is an integer number, the value of the PING_BODY_LIMIT
configuration setting.
Clients can use this header to decide how much POST data to send
in HTTP requests. If a client sends more than "n" bytes in the
request body, Healthchecks will store the first "n" bytes, and
ignore the rest.
The default value for PING_BODY_LIMIT is 10000 (10KB).
The Telegram onboarding flow in a nutshell:
1. user invites our bot in a channel and types "/start"
2. Telegram calls our webhook (/integration/telegram/bot/)
3. Our webhook generates and posts an invite link to the chat
4. User clicks the invite link, we show "Add Telegram" form
...
In step 3, when we post the invitation link, if Telegram returns
an error (for example, CHAT_WRITE_FORBIDDEN), our webhook was
throwing HTTP 500. In response, Telegram would retry the webhook
several times, but that's probably futile.
After this commit, the webhook will return HTTP 200, regardless
of whether we could post the invite to the Telegram chat or not.
There is a specific limit of how many other users a given user
can invite in their projects (depends on the plan they are on).
When the limit is reached, the user cannot invite *new* users
in their projects, but they can still invite team members
from one project into another project. In other words, we count
the number of unique invited users, not the number of memberships.
There was an UI bug in the "Invite a Team Member" dialog. The
dialog has an editable "Email" text field. When an user has reached
the team limit, and they open the "Invite" dialog, they could
enter a new user's email address in the Email field and try to invite
them. The server would refuse to exceed the team limit and would
return a plain HTTP 403 page. This is of course confusing to the
end user.
The fix is to show "Email" as a text field only if the user has
not yet exceeded their team size. If they have, then show "Email"
as non-editable text.
The problem:
- the first "pip wheel" collects a specific version of requests
- the second "pip wheel" collects the latest version of requests
- later "pip install" tries to install both and fails
The fix is to run "pip wheel" once, and it will then pick a single
version of requests that satisfies all constraints.
Fixes: #594
- Refactor transport classes to raise exceptions
on delivery problems, instead of returning error
message as string. Exceptions can carry extra meta
information (see TransportError.permanent field, see
MigrationRequiredError subclass). I considered attaching
the extra information to strings by subclassing str, but
using exceptions felt cleaner and less hacky.
- Add Channel.disabled field, for disabling integrations
on permanent errors. For example, if Slack returns
HTTP 404, we will now mark the integration as disabled
and will not make requests to that Slack endpoint again.