[web-php] master: Remove get_magic_quotes_gpc (#575)
| From: | Kamil Tekiela via GitHub | Date: | Tue, 28 Jun 2022 13:03:15 +0000 |
| Subject: | [web-php] master: Remove get_magic_quotes_gpc (#575) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-30169@lists.php.net to get a copy of this message | ||
Author: Kamil Tekiela (kamil-tekiela)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2022-06-28T13:57:16+01:00
Commit: https://github.com/php/web-php/commit/b2ff80507c59fe702ef1f10ad9c255ac9242b07d
Raw diff: https://github.com/php/web-php/commit/b2ff80507c59fe702ef1f10ad9c255ac9242b07d.diff
Remove get_magic_quotes_gpc (#575)
Changed paths:
M git-php.php
Diff:
diff --git a/git-php.php b/git-php.php
index 909562dd2..2451831d8 100644
--- a/git-php.php
+++ b/git-php.php
@@ -42,16 +42,6 @@
// We have a form submitted, and the user have read all the comments
if (count($_POST) && (!isset($_POST['purpose']) ||
!is_array($_POST['purpose']) || !count($_POST['purpose']))) {
- // Clean up incoming POST vars
- if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) {
- foreach ($_POST as $k => $v) {
- $cleaned[$k] = stripslashes($v);
- }
- }
- else {
- $cleaned = $_POST;
- }
-
// No error found yet
$error = "";
@@ -71,7 +61,7 @@
if (empty($_POST['password'])) {
$error .= "You must supply a desired password. <br>";
}
- if (empty($_POST['email']) || !is_emailable_address($cleaned['email'])) {
+ if (empty($_POST['email']) || !is_emailable_address($_POST['email'])) {
$error .= "You must supply a proper email address. <br>";
}
if (empty($_POST['yesno']) || $_POST['yesno'] != 'yes') {
@@ -89,13 +79,13 @@
$error = posttohost(
"https://main.php.net/entry/svn-account.php",
array(
- "username" => $cleaned['id'],
- "name" => $cleaned['fullname'],
- "email" => $cleaned['email'],
- "passwd" => $cleaned['password'],
- "note" => $cleaned['realpurpose'],
- "yesno" => $cleaned['yesno'],
- "group" => $cleaned['group'],
+ "username" => $_POST['id'],
+ "name" => $_POST['fullname'],
+ "email" => $_POST['email'],
+ "passwd" => $_POST['password'],
+ "note" => $_POST['realpurpose'],
+ "yesno" => $_POST['yesno'],
+ "group" => $_POST['group'],
)
);
// Error while posting