Subject: | First of all using this class is not... |
Summary: | Package rating comment |
Messages: | 1 |
Author: | Elon |
Date: | 2014-03-05 07:34:23 |
|
|
|
Elon rated this package as follows:
Utility: | Bad |
Consistency: | Insufficient |
|
Elon - 2014-03-05 07:34:23
First of all using this class is not safe. Values of HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP can be changed in request headers to any value. Also (even if value wasn't changed by user) this fields can contain list of IPs with commas as separators (you ignore that fact in your class).
Why are you changing order of IP parts from HTTP_CLIENT_IP field?
And of course you forgot about IPv6, which isn't good nowadays.
The last thing is that one file should contain only one entity (interface, class or structural code).
|