Jump to content

Posting a form with "curl curl" in an input causes error


Recommended Posts

When someone enters "curl curl" in the suburb field of a form I have I get an error "Forbidden You don;t have permission to access /curl-test.php om this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

 

This is a cut down version of the script which also cuases the same error.

<?php

echo '

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html lang="en">

<head>

<title>Test Curl</title>

<meta http-equiv="Content-Language" content="en-AU" />

<meta http-equiv="Country" name="Australia" />

<link rel=StyleSheet href="includes/style.css" type="text/css">

</head>

<body>';

if($_POST['action'] == "Save")

    {

    echo 'You entered a suburb of '.$_POST['suburb'];

    exit();

    }

else

    {

    echo '

    <form name="main_form" action="'.$_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">

    <input type="hidden" name="action" value="">

  Suburb:

  <input class="text_entry" type="text" name="suburb" size="200" maxlength="200" style="width:250px;" id="suburb" value="">

  <a href="#" onClick="document.main_form.action.value=\'Save\'; document.main_form.submit();">Save[/url]

    </form>';

    }

echo '

</body>

</html>';

 

 

This can be tested at http://www.cybernamixqld.com.au/curl-test.php.

 

If you enter "chicago" as a suburb it is alright but if you enter "curl curl" it is not.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.