Protect: Link fails in email sent to unlock site
Related to #8117
I had two reports of this this morning, in 831912-zen and 831859-zen.
In both cases, the users got the email to let them log in to their site. Upon clicking the login link, they got the following error:
{'error':'Bad Request','message':'Invalid input.'}
Note that 1 ticket was of a user that wasn't trusting REMOTE_ADDR, and the other was someone with many failed logins from their IP so they were blocked.
cc @enejb
The user see {'error':'Bad Request','message':'Invalid input.'} message after the login link expires of if they type the wrong link. Retrying again would work out for them.
cc: @lezama Should we increase the duration of that token?
How long is the duration of the token, @enejb ? I don't know how long these folks waited; I would guess not a long time but I don't know for a fact.
The link is only valid for 5 minutes.
It also says so in the email that we send out to the user.
Clicking the link below will allow you to either attempt additional login attempts or change your password for your WordPress site for 5 minutes from the ip address %2$s.
As I understand things users are usually only blocked for 20 minutes. So having something that is super long is probably not very useful.
But in the case where the token is not valid any more that doesn't seem to be the case.
As I understand things users are usually only blocked for 20 minutes. So having something that is super long is probably not very useful.
Actually, no. Users can be blocked for much longer, ESPECIALLY in cases where we are trusting the wrong header (which is the majority of cases when users get blocked); in those cases, blocks can be effectively indefinite (the block expires and then are blocked again almost immediately, and for longer). At least, that's how I understand it, so.. I think 5 minutes is not long enough. Especially when a user is frazzled and locked out and not sure what's going on, they might not go check their email right away.
I updated the email link duration to 15 minutes.
Can you explain a bit more about the wrong header? What is the issue there?
Can you explain a bit more about the wrong header? What is the issue there?
This should explain things a bit: PCYsg-8f0-p2
You can also look at 1257-gh-jpop-issues for some recent examples of this issue.
Thanks for the links. It would be good to implement some sort of solution where we automatically set the IP address in a better way. I know it really depends on the configuration of the server.
But maybe we can automate this somehow. For example if we know the IP address of the servers and make a request to the jetpack server. We could use the known predefined array of possible keys and headers and then try to configure the IP address that matched the one that we expect.
cc: @samhotchkiss What do you think?
Same problem here, unlock site link not working. I'm clicking within 5 minutes but still. I have to login to wordpress.com, go to settings, security, and disable protection, before logging in and activating protection again. Adding my IP adress to the whitelist does not solve the issue.
@merire111 Your site likely needs us to tweak a setting on our end. Can you contact us directly please?
https://jetpack.com/contact-support/
Same problem here too, unlock site link doesn't work. Not sure why this would be opt out and not opt in.
Same issue on 900393-zen In here, the user wasn't trusting REMOTE_ADDR so I switched to it.
Also reported in 899797-zen The user wasn't trusting REMOTE_ADDR so I switched to it.
@enejb It is my understanding that if the Headers that we are looking at are incorrect on our end, then the link won't work. I don't know what percentage of people who get blocked are blocked because they mistakenly enter the wrong password (and thus the link is useful for them), versus the people blocked because the headers we are trusting are wrong (and thus the link won't work for them). However, right now we are giving all the people with incorrect trusted headers "false hope" that they can get into their site by clicking the link we send them. I suppose there's no easy way to filter those out so we don't even send them a link and we just say "contact us please"?
I think there might be a way to filter them out. Will look into this some more. Great suggestion!
Also I think this should be fixed via the Jetpack UI somehow. Telling the user something is wrong and what they should do to fix it. (Contact support)
Also I think this should be fixed via the Jetpack UI somehow. Telling the user something is wrong and what they should do to fix it. (Contact support) cc: @samhotchkiss and @MichaelArestad :)
More discussion at p7rcWF-HJ-p2
I got this request when trying to login. Had it sent to email. Got this: {"error":"Bad Request","message":"Invalid input."}
And I did it all in minutes. So no timeout on the request. I'd say your plugin is broken.
@vrocks Could you contact us via this contact form and give us more details about your site? We'll help you get this fixed on your site.
Thanks!