Bug #78153 [NEW]: $_SERVER['REQUEST_METHOD'] become redirect when form field contains ($_GET)
| From: | salamj at gmail dot com | Date: | Wed, 12 Jun 2019 22:29:21 +0000 |
| Subject: | Bug #78153 [NEW]: $_SERVER['REQUEST_METHOD'] become redirect when form field contains ($_GET) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-221262@lists.php.net to get a copy of this message | ||
From: salamj at gmail dot com
Operating system: linux
PHP version: 7.3.6
Package: *Web Server problem
Bug Type: Bug
Bug description:$_SERVER['REQUEST_METHOD'] become redirect when form field contains
($_GET)
Description:
------------
When form with POST method contains text field and fill it with $_GET or
$_SESSION , $_POST, ...
the page in action redirect to 403 page error:
Test script:
---------------
<form method="post" action="<?php $_SERVER['PHP_SELF']
?>">
<input type="text" name="something">
<input type="submit" name="send" value="send">
</form>
<?php
$method = $_SERVER['REQUEST_METHOD'];
echo $method;
Expected result:
----------------
POST
Actual result:
--------------
Forbidden
You don't have permission to access /req.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use
an ErrorDocument to handle the request.
--
Edit bug report at https://bugs.php.net/bug.php?id=78153&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78153&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78153&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78153&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78153&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78153&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78153&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78153&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78153&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78153&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78153&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78153&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78153&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78153&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78153&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78153&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78153&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78153&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78153&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78153&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78153&r=mysqlcfg