Opened 4 months ago
Last modified 4 months ago
#23350 new defect (bug)
Pingback Denial of Service Fix - filter_var based IP validation
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Pings/Trackbacks | Version: | 3.5.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Attachments (1)
Change History (4)
In the future, if you have specific questions about a security fix, you can also email security@…, in case you have found something sensitive in nature.
Yes, the isset was missing too, forgot to mention. filter_var worked well for my tests, I still can run more tests against PHP 5.2, but I would need to know into which concrete bugs you run, especially with IPv4 validating which is used in the patch. I did not found any issues so far.
Note: See
TracTickets for help on using
tickets.

This was an SSRF fix, not directly a DoS fix. #4137 remains valid.
I generally just opt for what was done here, but sure, strcasecmp() is fine.
filter_var() was deliberately avoided because it has numerous bugs in 5.2.x and 5.3.x, in particular IDN domains but other bugs (IIRC) as well.
Colons in hostnames and trimming the hostname for dots were both deliberate. I'll publicly commit our extensive unit tests in the near future.
At a glance , your isset() appears proper.