I noticed in the error log, last week somebody tried sending a PM and it resulted in the "no Direct Access" error.
I'm not going to post the full message but I just tested a truncated version of it and it does cause the error. Here's the screenshots I just took. I have a feeling it's the speech marks in the message that has caused it.
The personal messages sql tables are set to utf8 general.
I have never come across this error myself. Does the pm go through if you remove the speech marks from the message?
Is there anything else logged in the error log pertaining to this?
QuoteI noticed in the error log ... resulted in the "no Direct Access" error.
Can you post the content of the error log, at that point?
That error typically only happens when you try to access something other than index.php directly (for instance if you tried to go to yourforum.com/Sources/Load.php in your browser). What URL are you being redirected to after sending a PM?
It appears to be the smiley that has caused it. I took the speech marks out, same error. But when I took the smiley out, it sent the pm.
Screenshot from the error log attached. I've blacked out the pm. I don't think it's fair to post it publicly.
Quote from: Oldiesmann on July 03, 2022, 05:22:38 PMThat error typically only happens when you try to access something other than index.php directly (for instance if you tried to go to yourforum.com/Sources/Load.php in your browser). What URL are you being redirected to after sending a PM?
It's send2 when you get the no direct access error.
Image 006.jpg
I just sent a short test message to myself here, also ending with that :-\ code with no issues.
Could you try sending the same PM to yourself, and see if moving that code to a different spot in the PM still makes it fail or if it's maybe related to the \ being the last character?
Yeah, it doesn't seem to do it on here.
The pm sends fine when I move the smiley.
I think is related to the slash at the end.
A bad mod maybe?
What mods do you have installed?
It's not mod related, I don't think. I only have Stop Forum Spam, Merge Posts and Tweet Embed.
I just tested it on a fresh install of smf 2.1.2 and it did the same error.
I can't repeat on my test site.
You can try on mine.
Register for an account and send me a pm on test2.turtleshellprod.com
Also tested on my own 2.1.2 test install, and it worked as it should.
Now, I can only come up with 2 things to look at - The mods, or the server config, is there something different between this one misbehaving install and all the rest?
A mod shouldn't trigger this -
if (!defined('SMF'))
die('No direct access...');
Nor should a smiley.
A mod could trigger it if it was misdesigned
Quote from: Darkness7148 on July 04, 2022, 12:16:31 PMI just tested it on a fresh install of smf 2.1.2 and it did the same error.
Clean files, clean database? Doesn't happen on my test install.