]> git.immae.eu Git - github/shaarli/Shaarli.git/commit
Add trusted IPs in config and try to ban forwarded IP on failed login
authorArthurHoaro <arthur@hoa.ro>
Wed, 3 Aug 2016 08:36:47 +0000 (10:36 +0200)
committerArthurHoaro <arthur@hoa.ro>
Sat, 5 Nov 2016 13:29:52 +0000 (14:29 +0100)
commit3116d8671d388690bac1070e39d2c74d28b14f0e
treea310adfe8af2c0bd0c792d914dd7c26bcf9d910e
parent4fd053d6b29a1b6724eda17a3daddb29b1bf1ca3
Add trusted IPs in config and try to ban forwarded IP on failed login

  * Add a new settings (which needs to be manually set): `security.trusted_proxies`
  * On login failure, if the `REMOTE_ADDR` is in the trusted proxies, try to retrieve the forwarded IP in headers.
  * If found, the client address is added in ipbans, else we do nothing.

Fixes #409
application/HttpUtils.php
index.php
tests/HttpUtils/GetIpAdressFromProxyTest.php [new file with mode: 0644]