zf1-future
zf1-future copied to clipboard
SUPEE-7405 from Magento 1.9.3.0 - Hostname Validation
The Zend_Validate_Hostname
validation was updated to add a DNS check of the A record for the domain.
@sreichel could you make that conditional? This should not be by default for sure.
@develart-projects i'm stuck. Is it me, or the tests? localhost.localdomain
is valid when falling back to checkdnsrr()
, not?
@develart-projects i'm stuck. Is it me, or the tests?
localhost.localdomain
is valid when falling back tocheckdnsrr()
, not?
checkdnsrr()
does a DNS lookup. While the domain in the test suite is syntactically valid, it is not an actual hostname reachable by the test runner, so it fails.
- Zend_Validate_HostnameTest::testBasic localhost.localdomain Failed asserting that true matches expected false.
Need some advice how to fix it.
- Zend_Validate_HostnameTest::testBasic localhost.localdomain Failed asserting that true matches expected false.
Need some advice how to fix it.
Add an option. Default to not using it. When not using it, don't do your whole thing.
The current behavior, as is, already works for all syntactically valid hostnames. It's just that it accepts names that don't exist, which may or may not be what you need.
Add an option.
How should it look like? I cant change the isValid()
methods signature (adding a parameter).
Add a new constant to turn it on/off?
imo you need to test both cases. Old one and your new update, so run 2 different tests for 2 different use cases. I think you can simply feed some common domain, like google.com for testing.