SimpleMachines / SMF

Simple Machines Forum — SMF in short — is free and open-source community forum software, delivering professional grade features in a package that allows you to set up your own online community within minutes!
https://www.simplemachines.org/
Other
596 stars 255 forks source link

[2.1]: Smileys at end of PMs cause 'No Direct Access' Error #8309

Open sbulen opened 2 months ago

sbulen commented 2 months ago

Basic Information

In 2.1, a PM with a smiley at the end causes a 'No Direct Access' error.

Not an issue in 3.0.

Steps to reproduce

  1. Send a PM with a smiley at the end

Expected result

Sent PM

Actual result

On screen: image

In the error log: image

Version/Git revision

2.1.4

Database Engine

All

Database Version

8.4

PHP Version

8.3.8

Logs

No response

Additional Information

From the forum: https://www.simplemachines.org/community/index.php?topic=589648.0

Oldiesmann commented 1 month ago

Looks like it can happen with any \ at the end of the message. I got this error in my log today:

No direct access...

UPDATE smf_messages
SET poster_name = '...', poster_email = '...', subject = 'Re: Photos Old and New', body = '[b][size=4][color=purple]This discussion is too quiet!  Noone is taking photos anymore?

So I'll share TV captures of 1 hour ago on one of our main inter-town highways: what fell from the sky, and the damage to the road.

Al it caused a big fire to the fields on both sides of the highway. Traffic is in stand still at present.[/color][/size][/b]\\'
WHERE id_msg = 255042
Function: modifyPost

action=jsmodify Sources/Subs-Post.php, line 2310