UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  eUKhost's Official Web Hosting Forum > Web Hosting and Domains > PHP Hosting

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 18-12-2008, 22:22
Junior Member
 
Join Date: Jul 2007
Location: UK
Posts: 12
Default 403 Error on Form Submit

A form on my site has stopped working. It used to work but if I submit now it throws a 403 error. The form HTML is generated and then processed with a PHP script. It has worked in the past but something must have changed on the server.

I have just isolated the problem.

If I disable mod_security the form works ok (but I don't want to do this).

The form submits the contents of a text box which includes a URL. mod_security clearly no longer likes me submitting text parameters that are URLs ie anything looking like "http://www.asitehere.com/". It works if I remove the "http://" bit from the front.

I use the form to dynamically add URL links to a database table and I want them to be the full URL.

So my question is how do I submit a URL that the user has typed in without mod_security going crazy?

I do not want to exclude the http:// bit of the URL because other people use the site and they will never remember to exclude it ... and a 403 error isn't going to help them when they forget.

My only thoughts are to use javascript to store a hidden version of the url that is typed in but strip off the http bit. It could then be reattached before being written into the database.

Any help would be appreciated!

Thanks,

Matt
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 19-12-2008, 03:06
Rock's Avatar
System Administrator (eUKhost.com)
 
Join Date: Dec 2006
Location: localhost
Posts: 2,357
Thumbs up

Hi Matt,

Our CTO, NickJ, is well versed with the mod_security, web application firewall. He'd be able to get this sorted for you once he's back. Meanwhile could you please open up a ticket with the appropriate details to produce the error on our end. We'd be glad to that you're sticking to the security for your website, rather than getting it removed in order to get the form working.. I like people who adhere to security Good luck..
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 19-12-2008, 03:27
Daniel's Avatar
Got root?
 
Join Date: Aug 2008
Location: England, UK
Posts: 179
Send a message via MSN to Daniel Send a message via Skype™ to Daniel
Default

Quote:
Originally Posted by Rock View Post
Hi Matt,

Our CTO, NickJ, is well versed with the mod_security, web application firewall. He'd be able to get this sorted for you once he's back. Meanwhile could you please open up a ticket with the appropriate details to produce the error on our end. We'd be glad to that you're sticking to the security for your website, rather than getting it removed in order to get the form working.. I like people who adhere to security Good luck..
*impresses with big firewall*

On a serious note I am also a security freak, software firewalls, hardware firewalls, AV etc. Anybody who runs without them is
__________________
Dan Miller
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 19-12-2008, 06:42
Rock's Avatar
System Administrator (eUKhost.com)
 
Join Date: Dec 2006
Location: localhost
Posts: 2,357
Cool

Quote:
Originally Posted by Daniel View Post
*impresses with big firewall*

On a serious note I am also a security freak, software firewalls, hardware firewalls, AV etc. Anybody who runs without them is
/me is much impressed to know that
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 19-12-2008, 12:15
Junior Member
 
Join Date: Jul 2007
Location: UK
Posts: 12
Thumbs up

I've submitted a ticket.

Quote:
<html>
<body>
<?php

//
// Test Form to submit URL text
//
echo " <!-- Form to add new link -->\n";
echo " <form name=\"test_form\" method=\"post\" action=\"test_form.php\">\n";
echo " <fieldset>\n";
echo " <legend>Test Form</legend>";

echo " <table>\n";
echo " <tr><td>Name</td><td><input type=\"text\" name=\"ilink_name\" size=\"80\" maxlength=\"80\" value=\"Website Name\" /></td></tr>\n";
echo " <tr><td>URL</td><td><input type=\"text\" name=\"ilink_url\" size=\"80\" maxlength=\"255\" value=\"enter url\" /></td></tr>\n";
echo " </table>\n";

echo " <input type=\"submit\" name=\"isubmit\" value=\"Add New\" />\n";
echo " </fieldset>\n";
echo " </form>\n";

?>

</body>
</html>
This simple PHP script demos the issue.

The script works if you enter "www.google.com" but throws a 403 error if you enter "http://www.google.com"

It appears to actually be the "http:/" at the start that causes the problem.

I'll wait for the support ticket response. It's not a critical issue and I can rework the code if required.

Just thought I'd post this info for other users who may search for it in the future.

Matt
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-01-2009, 18:07
Premium Member
 
Join Date: Jan 2007
Posts: 210
Default

Hi,
Just out of curiosity, have you tried entering www.someurl.com/index.php? Well as I said, just curious if your script is handling character / (must be going UTF encoded to your script) etc...

Best of luck!
Inderjeet
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 12-02-2009, 00:40
new member
 
Join Date: Feb 2009
Posts: 6
Default 403 Form Post Error

I'm also looking for a solution to this...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 12-02-2009, 00:47
new member
 
Join Date: Feb 2009
Posts: 6
Default Solution to 403 Form Post Error

I have found a solution to the form post 403 error (when using a URL as some data to submit). Why not use this technique too? I found it at:

LINK -> edrackham.com/javascript/solution-to-form-submit-403-error

It works for me no problems what-so-ever!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 12-02-2009, 09:47
Rock's Avatar
System Administrator (eUKhost.com)
 
Join Date: Dec 2006
Location: localhost
Posts: 2,357
Wink

Quote:
Originally Posted by a1phanumeric View Post
I have found a solution to the form post 403 error (when using a URL as some data to submit). Why not use this technique too? I found it at:

LINK -> edrackham.com/javascript/solution-to-form-submit-403-error

It works for me no problems what-so-ever!
Thank you for sharing the link & glad it worked out for you
__________________

Rock _a.k.a._ Jack L.

http://www.eUKhost.com
Windows Hosting || Windows Reseller Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT. The time now is 22:27.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
UK Web Hosting by eUKHosting 3.1.0
Copyright © 2001-2010, eUKhost LTD. All rights reserved.

 
 
UK VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

VoIP Dedicated Servers
Asterisk, Trixbox Dedicated Servers

Business Web Hosting
100% uptime Hosting

UK Cpanel Hosting
cPanel Shared Hosting

Domain Hosting
Cheap Domains & Hosting Plans

UK Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

ColdFusion Hosting
ColdFusion Web Hosting


 
Reseller Hosting
 
knowledgebase articles
eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting

Joomla Hosting
Joomla Web Hosting

Mambo Hosting
Mambo Web Hosting

Magento Hosting
Magento Web Hosting

Wordpress Hosting
Wordpress Web Hosting


popular blog categories

Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines
VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles

eUKhost - Web Hosting
UK Web Hosting Service