Opened 6 years ago
Closed 6 years ago
#573 closed defect (fixed)
Install breaks when domain is localhost
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.8 |
| Component: | Installation/Upgrade | Version: | 0.8 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Regex assumes the domain looks like something.somethingelse.
We probably don't need those checks.
Patch attached.
Attachments (1)
Change History (4)
Good point about .org.au :)
It's not really a huge deal, though. If someone tries to set it up badly and their cookies don't work, that's ok. I think it's more worthwhile to improve the documentation than it is to improve these sanity checks.
Note: See
TracTickets for help on using
tickets.
Repeated here from my post to the mailing list:
The regexp wants there to be at least one period (.) in there.
Break it up into parts
"localhost" does not satisfy this pattern, "four.three.two.one" does, as does "two.one"
Looking at that code, the next bit of logic compares the bbpress domain to the wordpress domain to test for cookie sharing, but it appears to only test the last two parts of the domain names. IE if your bbpress domain name is www.example.org and your wordpress domain name is www.example.org it tests them by comparing whether "example.org" matches "example.org".
This seems a bit dodgy as down here where I am and in other parts of the word we have domain names like www.example.org.au, so if we do a similar test we are checking "org.au" matches "org.au". So the test will potentially not return an error when it should, like if your bbpress domain name is www.example.org.au and your wordpress domain name is www.another.org.au, by the looks of things it will match "org.au" to "org.au" and keep you blissfully unaware that the integration won't work.
I can't suggest a better test because I'm not sure of the implications it may have to later setting of the cookies domain.