Topic: URLs being parsed into smilies?

I have a very strange forum parsing problem that seems to have started after I performed an upgrade of the packages on our Debian server.

Basically, when a URL is posted in a forum post, the ':/' in the 'http://' being parsed as a smilie (and converted to the appropriate image tag), hence breaking the link.

Take a look at this post for an example of what I mean:

http://www.ssradiouk.com/forums/viewtopic.php?id=4925

I'm very confused as to how upgrading the server software could have done this, but I know that both MySQL and Apache were updated, nd the problem seemed to appear around about the same time.

Any ideas much appreciated!

Matt.

Re: URLs being parsed into smilies?

It's probably a custom smiley your added.

Re: URLs being parsed into smilies?

Nope, I haven't added any smilies.  The smilie that is being produced is one of the standard ones, represented by:

:/

Hence why it is being converted in links that contain 'http://' (which shouldn't get parsed as a smilie,as this post demonstrates).

Re: URLs being parsed into smilies?

That's very odd. Can you post your parser.php file?

Re: URLs being parsed into smilies?

Here you go:

http://www.ssradiouk.com/forums/include/parser.php.zip

(I had to zip it up as it wouldn't post as code due to a bbcode error)

Re: URLs being parsed into smilies?

That's odd... there is no difference with the standard PunBB parser.

Which mods do you have installed?

Re: URLs being parsed into smilies?

No mods installed at all, it's really quite baffling as it's been working fine for years, but all of a sudden started going wrong after performing an upgrade (apt-get upgrade) of the packages on the Debian server.  I will see if I can get a list of exactly which packages were upgraded.

Re: URLs being parsed into smilies?

Perhaps a PCRE bug?

9 (edited by MattF 2008-02-09 17:40)

Re: URLs being parsed into smilies?

Have you checked one of the posts in the db to make sure that there's no space, (or anything else), between the http and the :?

Re: URLs being parsed into smilies?

It's affected every URL, even ones posted years ago that previously displayed fine - so I don't think it's that.

11

Re: URLs being parsed into smilies?

It's most likely not that, but it's the easiest thing to check before you start fault finding in earnest. smile

Re: URLs being parsed into smilies?

Fair point.  I've just done a search with PHPMyAdmin and no instances of 'http :' were found in any post messages sad

Re: URLs being parsed into smilies?

Try reinstalling the old PCRE version.

Re: URLs being parsed into smilies?

Good idea, I will try this tomorrow and let you know how I get on.  Thanks for all the suggestions so far smile

Re: URLs being parsed into smilies?

Moved to Troubleshooting, since the problem doesn't seem to be with PunBB

16 (edited by shiddot 2008-02-10 19:29)

Re: URLs being parsed into smilies?

Success at last!

It was indeed the upgrade of the Debian libpcre3 package that broke it.  The release notes of the latest version of the package read:

pcre3 (6.7+7.4-2) stable-security; urgency=high

  * Non-maintainer upload by the security team.
  * Upgrade to upstream version 7.4 to incorporate results of a security
    audit.  The version included here tries to expose the 6.7 API
    unchanged, and the pattern language is compatible with version 6.7
    (which means that some Perl 5.10 escape sequences are not supported).
  * This update fixes CVE-2007-1659, CVE-2007-1660, CVE-2007-1661,
    CVE-2007-1662, CVE-2007-4766, CVE-2007-4767, CVE-2007-4768.
  * Note that externally stored compiled patterns need to be recompiled
    becaue the internal bytecodes have changed.  (This feature is only
    rarely used; no further action is required by most users.)

-- Florian Weimer <fw@deneb.enyo.de>  Sun, 28 Oct 2007 21:34:34 +0100

Note the part:

The version included here tries to expose the 6.7 API unchanged, and the pattern language is compatible with version 6.7 (which means that some Perl 5.10 escape sequences are not supported).

So I looked in /var/cache/apt/archives for the previous version, found it, and then installed it using:

dpkg -i libpcre3_6.7-0.dotdeb.1_i386.deb

Finally I restarted Apache using:

/etc/init.d/apache2 restart

And voila, success!

I hope that helps anyone that might have the same problem, or even for making sure newer versions of PunBB support this new library version.

17 (edited by MattF 2008-02-10 20:19)

Re: URLs being parsed into smilies?

Must be something that's been introduced fairly recently then. I'm running 7.2 here, and that one hasn't exhibited the behaviour. I'd personally drop a report on their mailing-list if you can reproduce the fault with a clean install of pcre directly from the pcre/sourceforge site.

Re: URLs being parsed into smilies?

I wonder if Debian by default links to an external PCRE library as opposed to the one that's bundled with PHP. If they do, this is something we will have to deal with in 1.2.*. 1.3 will sport a new parser soon, so hopefully, this won't be an issue there.

shiddot, could you check the phpinfo() output and post the "Configure Command"?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: URLs being parsed into smilies?

Here you go:

http://www.ssradiouk.com/phpinfo.php