Fix for empty bbcode uid

Phliplip - October 3, 2009 - 14:30
Project:phpBB2Drupal
Version:6.x-2.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,

Apply check for empty bbcode uid to prevent all : (colons) being removed.

Example:

    // remove the bbcode_uid from post_text
    $topic->post_text = preg_replace("/:$topic->bbcode_uid/", '', $topic->post_text);

If $topic->bbcode_uid is empty, then all colons are removed, fx in http:// -> http// .

So possible fix is this

    // remove the bbcode_uid from post_text
    if(!empty($topic->bbcode_uid)) {
       $topic->post_text = preg_replace("/:$topic->bbcode_uid/", '', $topic->post_text);
    }

I found this issue on the following lines; 358, 371, 602, 780

Those line numbers are approx, due to some other bugfixes i have applied in #594876: Various bugfixes for signatures, access time and attachments

#1

Phliplip - October 3, 2009 - 15:56

This is also a fix that needs to be applied in the phpbb2privatemsg.module file

#2

nbz - October 3, 2009 - 17:46
Status:active» fixed

Thanks - I have applied this patch to:

Head: http://drupal.org/cvs?commit=270694
6.x-1.x branch: http://drupal.org/cvs?commit=270704
and Drupal 5 branch (which was accidental): http://drupal.org/cvs?commit=270696

#3

System Message - October 17, 2009 - 17:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.