PDA

View Full Version : UE on default documents may prevent emal sending


Lon Winters
09-22-2009, 11:33 AM
I just ran across this, thought I'd post a heads-up in case someone else stumbles on this situation.

I wanted to have a more friendly URL (coming from another email) to a contact page. The URL is formatted, www.thedomain.com/subfolder/. I didn't specify the actual file name in the URL. The file name is a default document, and I named it index.asp.

Using UE version 2.x, I noticed that the condition to execute the code also includes the HTTP referrer (Thank you for that, helps shut down the spam bots!)

So apparently, without the actual filename in the URL, it doesn't pass the referrer test and just reloads the page. In my case, I just removed that block of code, leaving the only condition as the Form Post. Not too worried about Spam yet.

Does this sound right? Did I need to remove all that code, or would just perhaps one of the parameters do it?

Jason Byrnes
09-22-2009, 02:56 PM
This is the currant page submit trigger.

It compares the address of the currant page with the address of the referring page. It includes the name of the file. You could change the if statement From:
if(($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) {

To:
if(($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"])) > 0) && isset($_POST)) {


for it to work on index pages.