[2.4.2] Trackbacks: fopen() and allow_url_fopen = Off

 
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Bug reports -> Bugs in 2.4.x
View previous topic :: View next topic  
Author Message
Tblue
Hooked :)
Hooked :)

Joined: 16 Mar 2008
Posts: 292
Reputation: 111.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 9

PostPosted: Wed May 28, 2008 14:53    Post subject: [2.4.2] Trackbacks: fopen() and allow_url_fopen = Off Reply with quote

Hello,

b2evo recommends allow_url_fopen = Off. This is a good idea, but you use fopen() with an URL at the same time and thus you violate your own rules/recommendations (sounds harder than it should).
When sending Trackbacks with a HTTP GET request, b2evo uses fopen(). If allow_url_fopen is enabled, nothing is wrong, everything works. But if it's disabled, remote files can't be opened with PHP using fopen().

Because of this problem, I've rewritten the trackback() function in inc/comments/_trackback.funcs.php to use fsockopen() instead of fopen().

I don't know if this bug also exists in earlier b2evo versions, because I'm using only version 2.4.2 (additionally, I'm too lazy to download an old version and check the code Big Razz).

Here is the diff then (to apply execute the command "patch -p1 < path/to/patch" on a shell in your b2evo root directory): http://files.ax86.net/b2evo/b2...open.patch

Nevertheless, b2evo is a great piece of software. Thanks!

Tblue
Back to top
View user's profile Send private message Visit poster's website
blogmeister
Hooked :)
Hooked :)

Joined: 05 Nov 2008
Posts: 214
Reputation: 11.4 add or subtract from this member's reputationadd or subtract from this member's reputation

PostPosted: Fri Dec 26, 2008 0:15    Post subject: Reply with quote

Hello.

b2evo staff - Is this considered a bug for v.2.4.5?

Thanks.
Back to top
View user's profile Send private message
Walter
Hooked :)
Hooked :)

Joined: 11 May 2004
Posts: 416
Reputation: 114.2 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 5

PostPosted: Fri Dec 26, 2008 7:58    Post subject: Reply with quote

It was already applied, AFAIK.
_________________
[]'s
- Walter
http://b2evolution.waltercruz.com
Back to top
View user's profile Send private message Visit poster's website
Tblue
Hooked :)
Hooked :)

Joined: 16 Mar 2008
Posts: 292
Reputation: 111.4 add or subtract from this member's reputationadd or subtract from this member's reputation
votes: 9

PostPosted: Fri Dec 26, 2008 8:19    Post subject: Reply with quote

Yes, I committed it to CVS a few months ago.

//edit: It's not fixed in 2.4.5, but I suppose the fix will be included in the next release.

_________________
ax86.net weblog (mostly German)
Join our IRC channel: irc://chat.freenode.net/#b2evolution (Webchat here)
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    b2evolution Forum Index -> Bugs in 2.4.x All times are GMT - 5 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
b2evolution Support Forum RSS Feed Forums powered by php Bulletin Board