-
Notifications
You must be signed in to change notification settings - Fork 8k
Bugfix for #64604 #509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix for #64604 #509
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By changing this line to
} else {
STR_FREE(diff);
goto nohost;
}
It will start to fail with strings like http://www.example/img/test.png.
Because of that, ext/filter/tests/015.phpt is broken and needs a modification - which should be avoided if possible. Suggestions?
|
Your patch has hard coded TLDs. It's better to come up with patch that handles any TLDs. |
|
This patch, as of now, uses a basic set of TLDs to use if a host matches a specific pattern. Without the free on the comment above, it is not required to match the hardcoded TLDs to be identified as a host. E.g. In the real world, there's no way to really match the right pattern for sure. Even if you do a DNS lookup on the string that is "supposed to be the host", e.g. index.com could be matched as host, but can also bo part of the path for a java-common directory structure. This patch basically fixed 2 issues with parse_url. The one with the hardcoded TLDs is one showing up in the comments. If the TLDs are a problem, I can split it up (the if on line 204 is simply at the wrong place) and create a new ticket for the 2nd issue in the comment to look for a more rock-solid solution. |
|
Since DNS looks or any access to network resource is not preferred, how about add 2nd optional parameter that adds non standard TLD names if necessary? Separating issue sounds good to me, one for fix "//" issue (merge from 5.4), another for fix non standard TLD issue (merge from 5.6) Personally, I don't mind merge your patch as it is now if optional parameter is going to be added newer releases, but I tends to like introduce new features to released versions :) Could you post mail to [email protected] to ask opinion from others. |
|
English please. @iwalz is this merged? |
|
@yohgaki No, this wasn't merged (I checked 5.4 and above). |
|
I think the patch itself is good. |
|
@kaplanlior Thank you. |
|
@yohgaki @mapthegod seems to have problems with his mail server since a while. It was no real comment. |
|
I think that this could be fixed if someone logged into the php github account and block him... or report abuse if it does not help... https://github.com/account/ignore_user/mapthegod @johannes please please could you try it? :) |
|
actually the link does not work from here, it needs to be done from his profile (setting drop down...) :) |
|
I tried to do the following:
but when I switch back to my personal account, I still have him blocked, so I suspect that the block user feature always uses your primary account. :( |
|
@Tyrael I have reported abuse (linking this thread...) and they got back to me: So it should be hopefully fixed now! ;) |
|
\o/ |
https://bugs.php.net/bug.php?id=64604