Why http authentication with htaccess get slow whe

2019-07-09 01:25发布

I don't know why but when i type a wrong password it always take alot of time to come back with authentication dialog.

but when i type a correct password it always go fast.

htaccess:

AuthUserFile c:/senha1
AuthName "Bem vindo"
AuthType Basic
require valid-user

I created this 'senha1' file with htpasswd.

Thanks.

1条回答
做个烂人
2楼-- · 2019-07-09 02:08

That's a simple measure to slow down brute force attacks.

Correctly authenticated requests are handled instantly, while incorrect authentication attempts are delayed by a second or so -- this doesn't bother a regular user that just made a typo, but it sure does slow down attackers that want to rapidly try thousands of passwords.

查看更多
登录 后发表回答